Exploring messaging features in Azure AppFabric Service Bus
We just released a Community Technology Preview for Service Bus that provides a rich set of messaging capabilities. Service Bus is already unique amongst platform-as-a-service offerings in providing relay capability for services that allows for global endpoint federation across network and trust boundaries. In this release we focused on providing cloud-based, message-oriented-middleware technologies that include reliable message queuing and durable publish/subscribe messaging. These are accessible both over a simple and broadly interoperable REST-style HTTPS protocol with long-polling support and a throughput-optimized, connection-oriented, duplex TCP protocol.
In this post we will walk through the steps to download and run a simple application that showcases the publish-subscribe capabilities of Service Bus. You will need to have Visual Studio 2010 and NuGet installed.
We will start by creating a new console application in VS:
Open the Project –> Properties and change the Target framework to .NET Framework 4
From the References node in Solution Explorer click on the context menu item for Add Library Package Reference. This will show only if you have NuGet Extension installed. (To learn more about NuGet see this TechEd video).
Search for “AppFabric” and select the Windows Azure AppFabric Service Bus Samples – PublishSubscribe item. Then complete the Install and close this dialog.
Note that the required client assemblies are now referenced and some new code files are added.
Add the following line to the main method in Program.cs and hit F5
At this point you will be prompted to provide a ServiceNamespace and Issuer Name and Key. You can create your own namespace from https://portal.appfabriclabs.com/Default.aspx
Once a new namespace has been created you can retrieve the key from the Properties section by clicking View under Default Key:
These values can now be used in the Console application:
At this point you can run thru the different scenarios showcased by the sample.
Following are some additional resources:
Looking forward to your feedback / questions / concerns / suggestions.