zeromq

edit

This is a community-maintained plugin!

Write events to a 0MQ PUB socket.

You need to have the 0mq 2.1.x library installed to be able to use this output plugin.

The default settings will create a publisher connecting to a subscriber bound to tcp://127.0.0.1:2120

 

Synopsis

edit

This plugin supports the following configuration options:

Required configuration options:

zeromq {
    topology => ...
}

Available configuration options:

Setting Input type Required Default value

address

array

No

["tcp://127.0.0.1:2120"]

codec

codec

No

"json"

mode

string, one of ["server", "client"]

No

"client"

sockopt

hash

No

topic

string

No

""

topology

string, one of ["pushpull", "pubsub", "pair"]

Yes

workers

number

No

1

Details

edit

 

address

edit
  • Value type is array
  • Default value is ["tcp://127.0.0.1:2120"]

0mq socket address to connect or bind. Please note that inproc:// will not work with logstashi. For each we use a context per thread. By default, inputs bind/listen and outputs connect.

codec

edit
  • Value type is codec
  • Default value is "json"

The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output, without needing a separate filter in your Logstash pipeline.

exclude_tags (DEPRECATED)

edit
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is array
  • Default value is []

Only handle events without any of these tags. Optional.

mode

edit
  • Value can be any of: server, client
  • Default value is "client"

Server mode binds/listens. Client mode connects.

sockopt

edit
  • Value type is hash
  • There is no default value for this setting.

This exposes zmq_setsockopt for advanced tuning. See http://api.zeromq.org/2-1:zmq-setsockopt for details.

This is where you would set values like:

  • ZMQ::HWM - high water mark
  • ZMQ::IDENTITY - named queues
  • ZMQ::SWAP_SIZE - space for disk overflow

Example:

    sockopt => {
       "ZMQ::HWM" => 50
       "ZMQ::IDENTITY"  => "my_named_queue"
    }

tags (DEPRECATED)

edit
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is array
  • Default value is []

Only handle events with all of these tags. Optional.

topic

edit
  • Value type is string
  • Default value is ""

This is used for the pubsub topology only. On inputs, this allows you to filter messages by topic. On outputs, this allows you to tag a message for routing. NOTE: ZeroMQ does subscriber-side filtering NOTE: Topic is evaluated with event.sprintf so macros are valid here.

topology

edit
  • This is a required setting.
  • Value can be any of: pushpull, pubsub, pair
  • There is no default value for this setting.

The default logstash topologies work as follows:

  • pushpull - inputs are pull, outputs are push
  • pubsub - inputs are subscribers, outputs are publishers
  • pair - inputs are clients, inputs are servers

If the predefined topology flows don’t work for you, you can change the mode setting

type (DEPRECATED)

edit
  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is string
  • Default value is ""

The type to act on. If a type is given, then this output will only act on messages with the same type. See any input plugin’s type attribute for more. Optional.

workers

edit
  • Value type is number
  • Default value is 1

The number of workers to use for this output. Note that this setting may not be useful for all outputs.