5.2. Writing Direct Applications in C++
This section describes three programs that implement direct messaging using a Direct exchange:
declare_queues.cpp binds a queue to the amq.direct exchange, so that messages sent to the direct exchange with the routing key value routing_key are delivered to the queue named message_queue.
direct_producer.cpp publishes messages to the amq.direct exchange, using the routing key routing_key.
listener.cpp uses a message listener to receive messages from the queue named message_queue.