Showing posts with label Difference between. Show all posts
Showing posts with label Difference between. Show all posts

Saturday, December 15, 2012

Difference between Windows Azure Service Bus Queue Messaging versus Service Bus Topic

Windows Azure Service Bus is ESB kind of solution which provides connectivity for disparate components within a distributed application. Azure Service Bus comes with two offerings, Service Bus Relay which enables clients and services to communicate independently of network address translation (NAT) and firewall obstacles via a cloud-hosted relay service and other one is Service Bus Brokered Messaging which provides robus messaging infrastructure that enables communication via durable queues.
 Let us move on to the orginal topic of what is Service Bus Queue and Service Bus Topic

Service Bus Queue:
 A Service Bus queue provides a first-in-first-out (FIFO) structure for transmitting messages between one (or more) message Producers and one or more message receivers (Clients). Figure 2 shows a single Producer transmitting a number of messages to a single queue. Each message is retrieved at most once, by a single receiver -- shown as Client 1 getting Msg 1, Client 2 getting Msg 2, and so on. The messages themselves contain both headers (also called message properties) and a body, where the body is simply a UTF-8 encoded byte array.

Service Bus Topic:


Topics are heavy duty big brothers of Queues. They recieve messages from producers just as queues do; where topics differ is in how clients receive messages from them. Instead of receiving messages directly from the topic, clients receive messages from something akin to a virtual queue (or -- for readers with database-inclined minds -- a "view" on top of the topic) known as a subscription. Just as for a queue, a single subscription can have multiple clients retrieving messages from it, as shown in Figure 2. In addition, subscriptions support both Retrieve and Delete as well as the Peek/Lock and Complete retrieval patterns.

Your comments are most welcome.