4.2. Writing Direct Applications in Python.
The following programs work together to implement direct 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.