Written by Altınok Darıcı on 28 - Nov - 2014

Microsoft Azure Service Bus Architecture (Relayed Messaging and Brokered Messaging)

Microsoft Azure Service Bus supports "Relayed and Brokered Messaging", "Service Bus Queues, Topics and Subscription" and Events Hubs (Preview) as messaging patterns.

Relayed and Brokered Messaging Patterns

Relayed Messaging

Relayed messaging is a centralized component of Service Bus. It is highly load balanced but it is centralized. Relayed Messaging supports WS standards, soap, rest. It is optimized for .Net developers who are develop WCF services. Also it has interfaces for SOAP and REST. There are different communication styles which are one way communication, request based messaging, event distribution over internet to support publish/subscribe messaging and bi directional socket communication. For example, you have an on-prem. server/service and do not want to open a port for inbound. But you want to use this server/service with external consumers. In this scenario, you can use Service bus for message relaying. Ok, What is solution? Open outbound port and create bi-directional socket to Azure. Then consumers connect to Azure address/ip, then relay service send message which coming from consumer to your on-prem server/service through the bi-directional socket. So you do not need to open an inbound port from your server or firewall.

As I told you above, there are several benefits but the key point is server and consumers are up and running at the same time so this is not fit to HTTP based communications such as browsers or mobile applications. Brokered message provide a solution for decoupled communication so server and consumers can perform their own jobs in different times.

Relay Service

Brokered Messaging

It is optimized for WCF and .net and also there are REST interfaces. The key feature is decoupling producers and consumers. In this scenario, there is one or more producers and there is one or more consumers, and they do not know each others, every producer and consumer only know broker, so producers' message are stored in broker (you can think as a queue), then consumers read this message from broker immediately or another time. Main blocks of brokered messaging is Queue, Topic and Subscription provides solution for async scenarios temporal decoupling publish/subscribe and load balancing.

Service Bus - Queue - Topic - Subscription

comments powered by Disqus