table of contents
Message::Passing::Output::ZeroMQ(3pm) | User Contributed Perl Documentation | Message::Passing::Output::ZeroMQ(3pm) |
NAME¶
Message::Passing::Output::ZeroMQ - output messages to ZeroMQ.
SYNOPSIS¶
use Message::Passing::Output::ZeroMQ; my $logger = Message::Passing::Output::ZeroMQ->new; $logger->consume({data => { some => 'data'}, '@metadata' => 'value' }); # Or see Log::Dispatch::Message::Passing for a more 'normal' interface to # simple logging. # Or use directly on command line: message-passing --input STDIN --output ZeroMQ --output_options \ '{"connect":"tcp://192.168.0.1:5552"}' {"data":{"some":"data"},"@metadata":"value"}
DESCRIPTION¶
A Message::Passing ZeroMQ output class.
Can be used as part of a chain of classes with the message-passing utility, or directly as a logger in normal perl applications.
ATTRIBUTES¶
See "CONNECTION ATTRIBUTES" in Message::Passing::ZeroMQ.
subscribe_delay¶
Time in floating seconds to sleep to ensure the receiving socket has subscribed. This is the longest the sleep might take.
See the slow-joiner problem: <http://zguide.zeromq.org/page:all#Getting-the-Message-Out>.
DEFAULT: 0.2 seconds
METHODS¶
consume ($msg)¶
Sends a message, as-is. This means that you must have encoded the message to a string before sending it. The "message-pass" utility will do this for you into JSON, or you can do it manually as shown in the example in Message::Passing::ZeroMQ.
SEE ALSO¶
SPONSORSHIP¶
This module exists due to the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> who sponsored its development for its VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with the SureVoIP API - <http://www.surevoip.co.uk/support/wiki/api_documentation>
AUTHOR, COPYRIGHT AND LICENSE¶
See Message::Passing.
2021-12-22 | perl v5.32.1 |