17 August 2023

What is “Azure messaging service”? When and why, we can use this service?

"Azure messaging service" is a platform where one component can send messages and another component can receive those messages from that platform for processing. It can be used during integration with Microsoft Dynamics CE and third parties.


In the above figure we can see that an MVC application stores unprocessed data in a database and then fetches the location and name of the data from that database and finally sends this information to the Azure Messaging Service as a message (JSON) where each message object contains the name and location of the data. Whenever a message arrives in Azure Messaging Service, an application retrieves and locks the message so that no other application can retrieve the same message and finally processes it and stores it in the database.

Now the question is why not sending messages directly to the application instead of Azure Messaging Service?

At first glance it may seem that the use of Azure Messaging Service is pointless here, but if you look a little closer, you will see that there is a reason for this.
  1. When a message is sent, they will fight among themselves over which of the three applications will process it.
  2. If an application fails to process then the message will be lost or the earlier mentioned MVC application has to resend the same message which means the MVC application has to wait for successful completion of processing the message from the process application.
Why Send through Azure Messaging Service?
  1. If an application fails to process then the message will come to the Azure Messaging Service again and other application can pick it.
  2. The MVC applications no longer have to wait. Which means a decoupling architecture can be created.
We can divide this messaging service into two parts.
  1. Azure Storage Queues.
  2. Azure Service Bus.

No comments:

Post a Comment

What is Azure Storage Queue and how to Create Azure Storage Queue message using C# console application.

Azure Storage Queue is a component of Azure Storage Account which is used for messaging service.  We can Add message to a Queue and also deq...