4.2. Writing Point-to-Point Applications in Python.
The following programs work together to implement Point-to-Point messaging using a Direct exchange:
declare_queues.py creates a queue on the broker, then exits.
direct_producer.py publishes messages to the direct exchange.
direct_consumer.py reads messages from the queue.
listener.py reads messages from the queue using a listener.