### Navigation

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

# devices.monitoredqueuedevice

## Module: `devices.monitoredqueuedevice`

Inheritance diagram for `zmq.devices.monitoredqueuedevice`:

MonitoredQueue classes and functions.

### Authors

- MinRK
- Brian Granger

## Classes

### `MonitoredQueue`

class `zmq.devices.monitoredqueuedevice.``MonitoredQueue`(in_type, out_type, mon_type, in_prefix='in', out_prefix='out')

  Bases: `zmq.devices.monitoredqueuedevice.MonitoredQueueBase`, `zmq.devices.basedevice.Device`

  Threadsafe MonitoredQueue object.

  Warning as with most ‘threadsafe’ Python objects, this is only threadsafe as long as you do not use private methods or attributes. Private names are prefixed with ‘_’, such as ‘self._setup_socket()’.

  See zmq.devices.Device for most of the spec. This subclass adds a <method>_mon version of each <method>_{in|out} method, for configuring the monitor socket.

  A MonitoredQueue is a 3-socket ZMQ Device that functions just like a QUEUE, except each message is also sent out on the monitor socket.

  If a message comes from in_sock, it will be prefixed with ‘in’. If it comes from out_sock, it will be prefixed with ‘out’

  A PUB socket is perhaps the most logical for the mon_socket, but it is not restricted.

  `bind_in`(addr)

    Enqueue ZMQ address for binding on in_socket.

    See zmq.Socket.bind for details.

  `bind_mon`(addr)

    Enqueue ZMQ address for binding on mon_socket.

    See zmq.Socket.bind for details.

  `bind_out`(iface)

    Enqueue ZMQ address for binding on out_socket.

    See zmq.Socket.bind for details.

  `connect_in`(addr)

    Enqueue ZMQ address for connecting on in_socket.

    See zmq.Socket.connect for details.

  `connect_mon`(addr)

    Enqueue ZMQ address for connecting on mon_socket.

    See zmq.Socket.bind for details.

  `connect_out`(iface)

    Enqueue ZMQ address for connecting on out_socket.

    See zmq.Socket.connect for details.

  `join`(timeout=None)

    wait for me to finish, like Thread.join.

    Reimplemented appropriately by sublcasses.

  `run`()
  `setsockopt_in`(opt, value)

    Enqueue setsockopt(opt, value) for in_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_mon`(opt, value)

    Enqueue setsockopt(opt, value) for mon_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_out`(opt, value)

    Enqueue setsockopt(opt, value) for out_socket

    See zmq.Socket.setsockopt for details.

  `start`()

    Start the device. Override me in subclass for other launchers.

### `MonitoredQueueBase`

class `zmq.devices.monitoredqueuedevice.``MonitoredQueueBase`(in_type, out_type, mon_type, in_prefix='in', out_prefix='out')

  Bases: `object`

  Base class for overriding methods.

  `bind_mon`(addr)

    Enqueue ZMQ address for binding on mon_socket.

    See zmq.Socket.bind for details.

  `connect_mon`(addr)

    Enqueue ZMQ address for connecting on mon_socket.

    See zmq.Socket.bind for details.

  `run`()
  `setsockopt_mon`(opt, value)

    Enqueue setsockopt(opt, value) for mon_socket

    See zmq.Socket.setsockopt for details.

### `ProcessMonitoredQueue`

class `zmq.devices.monitoredqueuedevice.``ProcessMonitoredQueue`(in_type, out_type, mon_type, in_prefix='in', out_prefix='out')

  Bases: `zmq.devices.monitoredqueuedevice.MonitoredQueueBase`, `zmq.devices.basedevice.ProcessDevice`

  MonitoredQueue in a Process. See MonitoredQueue for more.

  `bind_in`(addr)

    Enqueue ZMQ address for binding on in_socket.

    See zmq.Socket.bind for details.

  `bind_mon`(addr)

    Enqueue ZMQ address for binding on mon_socket.

    See zmq.Socket.bind for details.

  `bind_out`(iface)

    Enqueue ZMQ address for binding on out_socket.

    See zmq.Socket.bind for details.

  `connect_in`(addr)

    Enqueue ZMQ address for connecting on in_socket.

    See zmq.Socket.connect for details.

  `connect_mon`(addr)

    Enqueue ZMQ address for connecting on mon_socket.

    See zmq.Socket.bind for details.

  `connect_out`(iface)

    Enqueue ZMQ address for connecting on out_socket.

    See zmq.Socket.connect for details.

  `join`(timeout=None)
  `run`()
  `setsockopt_in`(opt, value)

    Enqueue setsockopt(opt, value) for in_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_mon`(opt, value)

    Enqueue setsockopt(opt, value) for mon_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_out`(opt, value)

    Enqueue setsockopt(opt, value) for out_socket

    See zmq.Socket.setsockopt for details.

  `start`()

### `ThreadMonitoredQueue`

class `zmq.devices.monitoredqueuedevice.``ThreadMonitoredQueue`(in_type, out_type, mon_type, in_prefix='in', out_prefix='out')

  Bases: `zmq.devices.monitoredqueuedevice.MonitoredQueueBase`, `zmq.devices.basedevice.ThreadDevice`

  MonitoredQueue in a Thread. See MonitoredQueue for more.

  `bind_in`(addr)

    Enqueue ZMQ address for binding on in_socket.

    See zmq.Socket.bind for details.

  `bind_mon`(addr)

    Enqueue ZMQ address for binding on mon_socket.

    See zmq.Socket.bind for details.

  `bind_out`(iface)

    Enqueue ZMQ address for binding on out_socket.

    See zmq.Socket.bind for details.

  `connect_in`(addr)

    Enqueue ZMQ address for connecting on in_socket.

    See zmq.Socket.connect for details.

  `connect_mon`(addr)

    Enqueue ZMQ address for connecting on mon_socket.

    See zmq.Socket.bind for details.

  `connect_out`(iface)

    Enqueue ZMQ address for connecting on out_socket.

    See zmq.Socket.connect for details.

  `join`(timeout=None)
  `run`()
  `setsockopt_in`(opt, value)

    Enqueue setsockopt(opt, value) for in_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_mon`(opt, value)

    Enqueue setsockopt(opt, value) for mon_socket

    See zmq.Socket.setsockopt for details.

  `setsockopt_out`(opt, value)

    Enqueue setsockopt(opt, value) for out_socket

    See zmq.Socket.setsockopt for details.

  `start`()

### Navigation

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