Archive for July, 2013

After the Windows Azure Brokered Messaging API post, I will show you how to create your service Bus for Brokered Messaging through the portal and how to connect it your application on Visual Studio 2012, after that you will be able to start building your first application using Windows Azure Service Bus Brokered Messaging whether by using the queue or even by using the Topic/Subscription

First of all open your Windows Azure portal and follow one of the below instructions:

The first one is by clicking on the +New button and getting everything from there, you will be able to define the type of service bus you want whether topic, or a queue one.

After that you can choose the type you want to start using, here is some basic information about the Relayed VS the Brokered Messaging (Topic/Subscription or queue). As for the Windows Azure Service Bus Notification Hub, you can find all the details in here.

After choosing one of the Service Bus Services, you will be asked for to choose between “Quick Create” or “Custom Create”. The main difference between both is that the “Quick Create” creates the Service Bus with Default Configuration Settings and in “Custom Create” you will have to define the configuration yourself.

if you choose the “Custom Create”, here are what will ask you to enter. (In the following case assuming that you want to build a queue Service Bus). You will have to enter the following fields, the queue name, the region where you want to host your service bus (you will have 8 choices, 8 Windows Azure datacenter worldwide, you will have to choose the best one most probable the nearest to you or your applications). Watch out that the Namespace Name must be unique, this what define your service bus between the others.

The second page is where you can define the required configurations.

For the topic Service Bus, it goes with the same process but only in the configuration part, there will be a slightly difference. Like the following:

Certainly you can skip the above step by simple choosing “Quick Create”, it will configure it for you with the default configuration like the below picture.

Let me here explain a bit the configurations for the queue and the topic (Common configurations):

  • Max Size:
  • Default Message Time to Live :
  • Enable Duplicate detection:

For the Queue configuration:

  • Move Expired Messages to the dead-letter subqueue:
  • Enable sessions

The other way where you can create the Service bus is by going to Service Bus button on the left most of the portal.

After that, just click on the button create a new service bus, you should be prompted with the following message:

This is where you will have to define the service bus namespace name and the region where the service bus will be hosted.

Once the service bus is created you will be able to see the following page, where you can make all the required configuration for whatever type you choose, the relayed, Topic/Subscription, or even Windows 8 Notification Hub.

If you want to work with queue, you can create on the queues in the top of the page where it will directly get you back to the “Quick Create” or the “Custom Create” step again.

Now connecting your application with Visual Studio:

To connect your service bus with your application on Visual Studio, you will need what is called the management access Key. If you go to your service bus page on the portal you will find the access key at the bottom of the page. Once you click on it, a new windows will be prompted and you will be able to see your keys, the connection string that you will use, to connect to your service bus, the default name which is the “issuerName” and the Default Key “issuerKey” (these are used most probably during the development).

After copying the above 3 things, you will have to go to Visual Studio:

In you service Definition file enter the following line of code to define that your application will require a connection o Service Bus

<WebRole name=”MyRole” vmsize=”Small”>


<Setting name=”Microsoft.ServiceBus.ConnectionString” />



After that go to your configuration file and define the connection string and enter the value of the connection string that you got from the portal from the access key.


<Setting name=”Microsoft.ServiceBus.ConnectionString”

value=”Endpoint=sb://[yourServiceNamespace];SharedSecretIssuer=[issuerName];SharedSecretValue=[yourDefaultKey]” />


Now Congratulations your applications is now connected to your service Bus, Now let’s start Building your first Queue or Topic/Subscription application


A new Technology is introduced mainly to enhance the way the communication is being done between the client and the server over the internet. At the beginning the client has to send a new request each time the user make or request any modification to be done in the opened webpage, later on a new technologies were used to enhance this type of connection and to transport data using XML or any other methods to decrease the reloading of the page and to make better way for the communication between the clients and the servers. One of these ways were using JavaScript where a lot of the new development applications depends on it nowadays.

The SignalR is a Microsoft new Technology that mainly focus not only on a better way where the clients can call the servers’ functions easily but also the application on the servers can reach their clients browsers or application functions’. On Windows Azure, with the rise of the use of JavaScript on it and the great role Node JS is taking whether where new methods and technologies are based on it, the interactions and the connection that can be made using Node JS and SignalR are one of the most interesting topic. It gives a lot of new opportunities for all the real time applications where it will be very easy to make a greater, and real time application connecting multiple clients to the server in the same time and connecting them together.

One of the great opportunities is the games. You can create a lot of cloud games that are based on the interaction between the clients and the server or even between the clients each other’s in a very easy and efficient way using these technologies.

Here is a great video to get started:

This is also a great resource where it can take you step by step into the development using SignalR: