### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- API »
- The PyZMQ API »

# devices.monitoredqueue

## Module: `devices.monitoredqueue`

MonitoredQueue classes and functions.

### Authors

- MinRK
- Brian Granger

`zmq.devices.monitoredqueue.``monitored_queue`(in_socket, out_socket, mon_socket, in_prefix='in', out_prefix='out')

  Start a monitored queue device.

  A monitored queue behaves just like a zmq QUEUE device as far as in_socket and out_socket are concerned, except that all messages also go out on mon_socket. mon_socket also prefixes the messages coming from each with a prefix, by default ‘in’ and ‘out’, so all messages sent by mon_socket are multipart.

  The only difference between this and a QUEUE as far as in/out are concerned is that it works with two XREP sockets by swapping the IDENT prefixes.

  Parameters : | in_socket : Socket One of the sockets to the Queue. Its messages will be prefixed with ‘in’. out_socket : Socket One of the sockets to the Queue. Its messages will be prefixed with ‘out’. The only difference between in/out socket is this prefix. mon_socket : Socket This socket sends out every message received by each of the others with an in/out prefix specifying which one it was. in_prefix : str Prefix added to broadcast messages from in_socket. out_prefix : str Prefix added to broadcast messages from out_socket.

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- API »
- The PyZMQ API »