Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
RabbitMQ Essentials

You're reading from   RabbitMQ Essentials Build distributed and scalable applications with message queuing using RabbitMQ

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781789131666
Length 154 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Lovisa Johansson Lovisa Johansson
Author Profile Icon Lovisa Johansson
Lovisa Johansson
David Dossot David Dossot
Author Profile Icon David Dossot
David Dossot
Arrow right icon
View More author details
Toc

Sending responses to the publisher

It is true that all of our interactions with RabbitMQ so far have been one way and asynchronous. It is also true that clients interacting with a service usually expect to receive a response. Reversing the publisher and consumer roles in the response phase requires the client to act as a publisher and the service as a consumer.

Different queues are used for requests and responses, as demonstrated in Chapter 2, Creating a Taxi Application, and illustrated in the following diagram:

Fig 5.1: A request-response interaction performed with message queues

In the following diagram, Fig 5.2, we can see the following:

  • When a taxi driver confirms a booking request, a message is sent to the message broker with information about the driver (5).
  • The application service receives the message (6), stores the information in the database (7), and confirms the booking with the mobile application, which is ultimately shown to the customer (8).
  • At this point, the taxi needs...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image