Messag...ZeroMQ(3pm)
π Message::Passing::Output::ZeroMQ β the vibe β¨
okay bestie, so this is a page from the User Contributed Perl Documentation β it's the manual for Message::Passing::Output::ZeroMQ, and it's literally the class that lets you yeet your messages out into ZeroMQ. let's get into it π«Ά
πΈ NAME πΈ
Message::Passing::Output::ZeroMQ β output messages to ZeroMQ. that's it, that's the whole job π
π¦ SYNOPSIS π¦
here's the whole look, copy it exactly bestie:
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"}
so like β you can spin up a logger, call consume on it, or (if you want the more "normal" interface for simple logging) go peep Log::Dispatch::Message::Passing, or just run the whole thing straight from the command line with message-passing. three paths, all iconic π
β¨ DESCRIPTION β¨
it's a Message::Passing ZeroMQ output class, periodt.
you can use it as part of a chain of classes alongside the message-passing utility, or you can just use it directly as a logger in your normal everyday perl apps. both are valid, both are cute π
π ATTRIBUTES π
peep "CONNECTION ATTRIBUTES" in Message::Passing::ZeroMQ for the deets on those, bestie.
π subscribe_delay
Time in floating seconds to sleep β and this is so you can make sure the receiving socket has actually subscribed. it's the longest the sleep might take, so like, don't expect it to always go the full distance.
this exists because of 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. and when I say as-is I mean as-is β you must have already encoded the message to a string before sending it. no takebacks, no encoding for you π
the message-pass utility will do that encoding for you into JSON, or you can do it manually yourself, exactly like the example shows over in Message::Passing::ZeroMQ.
π SEE ALSO π
Message::Passing::ZeroMQMessage::Passing::Input::ZeroMQMessage::PassingZeroMQ<http://www.zeromq.org/>
π SPONSORSHIP π
not me getting emotional β this module literally exists because of the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> who sponsored its development for their 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. that's where all the author/copyright/license tea lives, bestie β¨
and that's the whole page, no cap π
okay so the sign-off: this doc ships with perl v5.32.1, dated 2021-12-22 β so go forth and output your messages to ZeroMQ, you absolute main character π¦π
π¦ where this page comes from
- debian bookworm: libmessage-passing-zeromq-perl 0.010-3 Β· AGPL-3.0-only
- debian trixie: libmessage-passing-zeromq-perl 0.010-3 Β· AGPL-3.0-only
- ubuntu jammy: libmessage-passing-zeromq-perl 0.010-3 Β· AGPL-3.0-only
- ubuntu noble: libmessage-passing-zeromq-perl 0.010-3 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms