Class: LogStash::Outputs::ZeroMQ
- Inherits:
-
Base
- Object
- Base
- LogStash::Outputs::ZeroMQ
- Defined in:
- lib/logstash/outputs/zeromq.rb
Overview
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
Instance Method Summary collapse
Instance Method Details
#close ⇒ Object
73 74 75 76 77 78 79 |
# File 'lib/logstash/outputs/zeromq.rb', line 73 def close begin error_check(@zsocket.close, "while closing the socket") rescue RuntimeError => e @logger.error("Failed to properly teardown ZeroMQ") end end |
#multi_receive_encoded(events_and_encoded) ⇒ Object
def close
81 82 83 |
# File 'lib/logstash/outputs/zeromq.rb', line 81 def multi_receive_encoded(events_and_encoded) events_and_encoded.each {|event, encoded| self.publish(event,encoded)} end |
#register ⇒ Object
66 67 68 69 70 |
# File 'lib/logstash/outputs/zeromq.rb', line 66 def register load_zmq connect end |