There are many ways to organize communication between applications, services and devices. In most cases it is a custom ad-hoc solution designed for specific needs of connected parts and is often implemented anew. At Devbridge we’ve actually done quite a number of these implementations. <a href="https://www.naptor.com/">cheap web development</a><br><br>Currently our primary application deployment platform is Azure Cloud and we've become interested in one of the recently introduced services Azure Service Bus for exactly the reason of standardizing communication between our applications within the Azure Cloud environment and also for Client-service scenarios.<br>AzureMessaging Component<br><br>In short - Azure Service Bus allows us to connect any applications or devices both within and outside of Azure Cloud. Our research for this service capability is concentrated in new component called AzureMessaging which is being implemented as part of our Devbridge Sourcery initiative.<br><br>AzureMessaging is created as a wrapper over Azure Service Bus messaging which supports spawning any number of background threads for each message queue. So, if processing a message is an IO intensive operation you can double the throughput by simply assigning two or more worker threads. <a href="https://www.naptor.com/">cheap web development</a> The component supports automatic Retries on messages generating errors with Failed messages sent to a Dead Letter Queue when its Retry threshold is reached.<br><br>Installation<br><br>AzureMessaging is provided as a Nuget package. To install the package run the following command in the Visual Studio Package Manager Console:<br><br>PM> Install-Package AzureMessaging<br>Configuration<br><br>Set Azure Service Bus connection string in Web.config/App.config file:<br><br><connectionStrings><br>   <add name="ServiceBusConnectionString" connectionString="SERVICE_BUS_CONNECTION_STRING" /><br></connectionStrings><br>Messages<br><br>The client with the server communicates by sending messages. Examples include:<br><br>public class GreetSampleMessage<br><br>   public string Text  get; set; <br><br><br>public class GreetWorldSampleMessage<br><br>   public string Name  get; set; <br>   public string Description  get; set; <br><br><br><br>Note: It is important to have unique class names because a queue name is constructed from a type name.<br>Server Usage<br><br>Usage code:<br><br>var queueClientFactory = new QueueClientFactory(SERVICE_BUS_CONNECTION_STRING_NAME);<br>var server = new AzureMessageService(queueClientFactory);<br><br>//Server settings<br>var settings = new MessageHandlerSettings<br><br>   NoOfThreads = 2,<br>   NoOfRetries = 3,<br>   IntervalBetweenRetries = TimeSpan.FromSeconds(10),<br>   DuplicateIntervalWithEachRetry = true<br>;<br><br>//Register handlers to handle messages from clients<br>server.RegisterHandler<GreetSampleMessage>(x =><br><br>   var greetSampleMessage = x.GetBody();<br>   ...<br><br>   return null;<br>, settings);<br><br>server.RegisterHandler<GreetWorldSampleMessage>(x =><br><br>   var greetWorldSampleMessage = x.GetBody();<br>   ...<br><br>   return null;<br>, settings);<br><br>//Start messages handling<br>server.Start();<br><br>...<br><br>//Stop messages handling<br>server.Stop();<br><br>//Free resources<br>server.Dispose();<br><br><a href="https://www.naptor.com/">cheap web development</a>