Good question. In this case the the invoice service returns response to the client as soon as it puts the message into the queue. The client need not know the status of invoice generation.
The worker process takes care of collecting the invoice data and generation of the PDF asynchronously.
Samuel Johnson R
Software Engineer by day. Ninja by night.
Hi. It's a great read. I have a doubt regarding the example you have shared. The client requests the service for invoice creation using rest and thus it gets the response in the same call. But when using message queue, the request will be made to the invoice generation which in turn push to queue for other components to process asynchronously, so how the client comes to know of the response in this case. Am I missing anything.