ZeroMQ (om_zmq)

This module provides message transport over ZeroMQ, a scalable high-throughput messaging library.

See the im_zmq for the input pair of this module.


The om_zmq module accepts the following directives in addition to the common module directives. The Address, ConnectionType, Port, and SocketType directives are required.


This directive specifies the ZeroMQ socket address.


This mandatory directive specifies the underlying transport protocol. It may be one of the following: TCP, PGM, or EPGM.


This directive specifies the ZeroMQ socket port.


This mandatory directive defines the type of the socket to be used. It may be one of the following: REP, ROUTER, PUB, XPUB, or PUSH. This must be set to PUB if ConnectionType is set to PGM or EPGM.


This directive specifies the ZeroMQ socket interface.


If this boolean directive is set to TRUE, om_zmq will bind to the Address specified and listen for connections. If FALSE, om_zmq will connect to the Address. The default is FALSE.


See the OutputType directive in the list of common module directives. The default value is Dgram.


This directive can be used to set ZeroMQ socket options. For example, SockOpt ZMQ_BACKLOG 2000. This directive may be used more than once to set multiple options.


Example 1. Using the om_zmq Module

This example configuration reads log messages from file and forwards them via ZeroMQ PUSH socket over TCP.

<Input file>
    Module          im_file
    File            "/var/log/messages"

<Output zmq>
    Module          om_zmq
    SocketType      PUSH
    ConnectionType  TCP
    Port            1514

<Route file_to_zmq>
    Path            file => zmq