---
name: "Message::Passing::Output::ZeroMQ"
section: "3pm"
platform: "linux"
package: "libmessage-passing-zeromq-perl"
version: "0.010-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Message::Passing::Output::ZeroMQ"
---

# Message::Passing::Output::ZeroMQ(3pm)

output messages to ZeroMQ.

## 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

- Message::Passing::ZeroMQ

  - Message::Passing::Input::ZeroMQ

  - Message::Passing

  - ZeroMQ

  - \<http://www.zeromq.org/\>

  ## 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.
