Since AMQP messages are unidirectional, how can an RPC server reply back to the original client with a result? With RabbitMQ in the middle, the RPC server doesn’t even know the identity of the calling client unless there’s an application-specific ID in the message payload. Thankfully, the guys at RabbitMQ have an elegant solution: use messages to send replies back. On every AMQP message header is a field called reply_to. Within this field the producer of a message can specify the queue name they’ll be listening to for a reply. The receiving RPC server can then inspect this reply_to field and create a new message containing t...
- Chapter 4. Solving problems with Rabbit: coding and patterns
- from RabbitMQ in Action: Distributed messaging for everyone
- Publisher: Manning Publications
- Released: May 2012
Bi-directional communication with RabbitMQ.
Share this highlighthttp://www.safaribooksonline.com/a/rabbitmq-in-action/220336/