Skip to content


sustrik edited this page · 31 revisions
Clone this wiki locally

0MQ plugin for RabbitMQ

The purpose of this plugin is to provision 0MQ sockets that relay messages into RabbitMQ. Each 0MQ socket type is given an idiomatic encoding in the AMQP broker model, which means AMQP clients can interoperate.

Among other things, this means you can use RabbitMQ as a device in a 0MQ network, gaining rabbity goodness such as persistence and monitoring; and, you can use RabbitMQ as a gateway from 0MQ to other protocols such as AMQP, STOMP or XMPP.


You have to have both RabbitMQ server and 0MQ installed.

For instructions concerning downloading and installation of RabbitMQ Server look here:

For instructions concerning downloading and installation of 0MQ look here:


Copy the files from the downloads section of this repository into the RabbitMQ plugin directory as explained here:


The mapping between 0MQ sockets and exchanges and queues is managed by configuration. Each instance of a mapping is called a “service”.

The configuation file should be located in RabbitMQ configuration directory as explained here:

Here is an example, given as a complete RabbitMQ config file:

          [{bind, "tcp://"}],
          [{bind, "tcp://"}],
          [{exchange, <<"amq.fanout">>}]},
          [{bind, "tcp://"}],
          [{bind, "tcp://"}],
          [{exchange, <<"pipeline">>}, {queue, <<"pipeline">>}]},
          [{bind, "tcp://"}],
          [{bind, "tcp://"}],
          [{req_queue, <<"requests">>}]}]}]}].

The general pattern for the R0MQ section is

          [{BindOrConnect, InAddress}, ...],
          [{BindOrConnect, OutAddress}, ...],
          [{OptionKey, OptionValue}, ...]},


    ServiceType = pubsub
                | pipeline
                | reqrep
    BindOrConnect = bind
                  | connect

0MQ plugin for RabbitMQ maps different messaging patterns — as defined by 0MQ — to different encodings in the AMQP model. To understand exact semantics of each pattern, details of corresponding AMQP encoding and exact semantics of the associated configuration entries, check the pages dedicated to individual patterns:

Something went wrong with that request. Please try again.