Prerequisites

  • An Azure subscription
  • Visual Studio 2013 or 2015
  • Azure SDK

Also download the Azure Service Bus Explorer and extract it into a handy folder.

Next: keep focused on the hands-on.

Check-point 1

We’ll create a service bus, and a topic from the Azure Portal. Then we’ll configure the Topic with specific permissions for writing and reading. Lastly, we’ll add subscriptions to the Topic, using Azure Service Bus Explorer.

(Hands on only!)

Check-point 2

In this part we’re going to create a very simple sender and receiver.

  1. Create a solution and name it AzureSBHandsOnwith, and 2 console projects call one AzureSBSender and the other AzureSBReceiver.
  2. Add the nuget packages to each project:
    • Microsoft.WindowsAzure.ConfigurationManager
    • WindowsAzure.ServiceBus
  3. Update the configs. The config for the sender shuld have the Microsoft.ServiceBus.ConnectionString key set to the Topic config. The config for receiver should be set to Subscription.
  4. Your Sender code should be similar to:
  5. Your Receiver code should be similar to:

Check-point 3

In this part we’re going to enhance our sender and receiver code.

  1. Your Sender code should be similar to:
  2. Your Receiver code should be similar to:

Bonus points

If we have time we’ll explore more SB Topic/Subscription topics. (hands on only!)

Further reading

Service Bus documentation

Service Bus Learning Path