.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Message::Passing::Output::ZeroMQ 3pm" .TH Message::Passing::Output::ZeroMQ 3pm "2017-08-02" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Message::Passing::Output::ZeroMQ \- output messages to ZeroMQ. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Message::Passing::Output::ZeroMQ; \& \& my $logger = Message::Passing::Output::ZeroMQ\->new; \& $logger\->consume({data => { some => \*(Aqdata\*(Aq}, \*(Aq@metadata\*(Aq => \*(Aqvalue\*(Aq }); \& \& # Or see Log::Dispatch::Message::Passing for a more \*(Aqnormal\*(Aq interface to \& # simple logging. \& \& # Or use directly on command line: \& message\-passing \-\-input STDIN \-\-output ZeroMQ \-\-output_options \e \& \*(Aq{"connect":"tcp://192.168.0.1:5552"}\*(Aq \& {"data":{"some":"data"},"@metadata":"value"} .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" A Message::Passing ZeroMQ output class. .PP Can be used as part of a chain of classes with the message-passing utility, or directly as a logger in normal perl applications. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" See \*(L"\s-1CONNECTION ATTRIBUTES\*(R"\s0 in Message::Passing::ZeroMQ. .SS "subscribe_delay" .IX Subsection "subscribe_delay" Time in floating seconds to sleep to ensure the receiving socket has subscribed. This is the longest the sleep might take. .PP See the slow-joiner problem: . .PP \&\s-1DEFAULT: 0.2\s0 seconds .SH "METHODS" .IX Header "METHODS" .SS "consume ($msg)" .IX Subsection "consume ($msg)" Sends a message, as-is. This means that you must have encoded the message to a string before sending it. The \f(CW\*(C`message\-pass\*(C'\fR utility will do this for you into \s-1JSON,\s0 or you can do it manually as shown in the example in Message::Passing::ZeroMQ. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "Message::Passing::ZeroMQ" 4 .IX Item "Message::Passing::ZeroMQ" .PD 0 .IP "Message::Passing::Input::ZeroMQ" 4 .IX Item "Message::Passing::Input::ZeroMQ" .IP "Message::Passing" 4 .IX Item "Message::Passing" .IP "ZeroMQ" 4 .IX Item "ZeroMQ" .IP "" 4 .IX Item "" .PD .SH "SPONSORSHIP" .IX Header "SPONSORSHIP" This module exists due to the wonderful people at Suretec Systems Ltd. who sponsored its development for its VoIP division called SureVoIP for use with the SureVoIP \s-1API\s0 \- .SH "AUTHOR, COPYRIGHT AND LICENSE" .IX Header "AUTHOR, COPYRIGHT AND LICENSE" See Message::Passing.