Behind Service Bus Connection String

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




When working with Service Bus, it is very useful to make a usage of Service Bus Connection String to create SB-entities.
For example, following line of code can be used to create the QueueClient instance which can be used to send and receive messages:

var client = QueueClient.CreateFromConnectionString(connStr, “queuname”);

Connection string looks usually like:


Connection String is very useful, because many information like service bus namespace and all credentials are contained inside of that staring. This enables creation of for example QueueClient in a single line of code.
In general Connection String is consisted of a moniker (sb://..) which includes protocol and URI with namespace. This defines the Endpoints and/or StsEndpoints.
Additionally it contains a number of so called connection properties which describe credentials.

Following picture illustrates the code which extracts all these artifacts inside of Service Bus library.


Posted May 21 2013, 08:14 AM by Damir Dobric


Windows Azure wrote Windows Azure Community News Roundup (Edition #67)
on 05-31-2013 20:32

Welcome to the newest edition of our weekly roundup of the latest community-driven news, content and is a .Net Community Blog powered by daenet GmbH.