Inspirel banner

Programming Distributed Systems with YAMI4

7.3 Queues

The queue server allows to implement efficient producer-consumer scenarios where each message sent by a given producer is delivered to exactly one from a set of consumers. From the high-level perspective the queue service is similar to the broker service in a way that it acts as a middle component between producers and consumers, but with several important differences:

The queue service can be particularly useful in load-balancing systems, where individual job requests are delivered to many processing nodes in a round-robin fashion.

Even though the queue server has the capability to retain messages until consumers are ready to receive them, it does not offer any persistency and is not supposed to be used as a long-term storage service.

The message routing in the queue service can be summarized as:

There is no restriction on the format and content of messages that are routed by the queue server - in fact, they do not even need to represent valid parameters object and can be arbitrary blobs of binary data.

The following subsections describe the messaging ``API'' of the queue server and its configuration parameters.

7.3.1 Put

7.3.2 Get

7.3.3 Try-Get

7.3.4 Get Statistics

7.3.5 Startup and Configuration