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
output {
zeromq {
address => ... # array (optional), default: ["tcp://127.0.0.1:2120"]
codec => ... # codec (optional), default: "plain"
mode => ... # string, one of ["server", "client"] (optional), default: "client"
sockopt => ... # hash (optional)
topic => ... # string (optional), default: ""
topology => ... # string, one of ["pushpull", "pubsub", "pair"] (required)
workers => ... # number (optional), default: 1
}
}
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.
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.
Only handle events without any of these tags. Note this check is additional to type and tags.
Server mode binds/listens. Client mode connects.
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:
Example: sockopt => [“ZMQ::HWM”, 50, “ZMQ::IDENTITY”, “my_named_queue”]
Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.
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.
The default logstash topologies work as follows:
If the predefined topology flows don’t work for you, you can change the ‘mode’ setting TODO (lusis) add req/rep MAYBE TODO (lusis) add router/dealer
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.
The number of workers to use for this output. Note that this setting may not be useful for all outputs.