5.2. Writing Point-to-Point Applications in C++
This section describes three programs that implement Point-to-Point 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.