Message queue

This article explains what is message queue on data flowchart. According to flowchart “web backend” communicates with “compute backend” via message queue. Actually, any message broker could stand here. So, there are two are bundled at the moment:

  1. In-memory queue (default) - simple broker for combined deployment in one joined backend.

  2. ZeroMQ adapter - brokerless message queue based on pyzmq module. Set config parameters:

    WORKERS_MODULE = "pantra.workers.zeromq"
    # for network
    ZMQ_LISTEN = 'tcp://*:5555'          # binding IP address:port
    ZMQ_HOST = 'tcp://127.0.0.1:5555'    # IP address:port to connect to
    # for socket piping
    ZMQ_LISTEN = 'ipc:///tmp/pantra.sock'
    ZMQ_HOST = ZMQ_LISTEN
    

Hint

To adopt another message broker one should inherit BaseWorkerServer and BaseWorkerClient classes in one module. Then set WORKERS_MODULE to this module name.