Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Windows Azure Service Bus Client SDK with Task Based Asynchronous API

Windows Azure Service Bus Client SDK with Task Based Asynchronous API

This item in japanese

Lire ce contenu en français

Microsoft recently released Windows Azure Service Bus Client SDK with System.Threading.Tasks.Task based versions of all  asynchronous APIs including the ability to write asynchronous and readable code. The latest release has been compiled against .NET Framework 4 and hence it will work with both Visual Studio 2012 and its previous counterpart.

Scott Seely, Senior SDE, Windows Azure Service Bus team demonstrates the functioning of the SDK by making use of Microsoft.ServiceBus.NamespaceManager and Microsoft.ServiceBus.Messaging.QueueClient in the official MSDN blog post titled - Task Based APIs for Service Bus.

He then attempts to verify whether the queue exists, create the queue if it does not exist and send/receive a message from the queue. Scott demonstrates the code in such a way that the message will be delivered about 5 seconds after it is sent to enable client to perform other activities with the CPU instead of waiting for the message to show up and return.

Windows Azure Service Bus Client SDK has been developed in such a way that all exceptions only throw when the task completes including the ability to hold on to the task and wait for it to complete and can be installed either via the NuGet or using package manager console in Visual Studio.

In addition to the above mentioned features, Windows Azure Service Bus Client SDK also ships with support for message browsing, ability to suspend and resume sending and receiving messages to and from queues and topics by using the Microsoft.ServiceBus.Messaging.EntityStatus enumeration and ability to auto delete idle queue, topic or subscription after an interval specified in AutoDeleteOnIdle property.

The recent release of the SDK introduces an event-driven or push messaging programming model, which is an alternative to a receive loop with support for concurrent message processing including an ability to process messages at variable rates.

Rate this Article