Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create the queue if it does not exist already
- var connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");
- var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);
- if (!namespaceManager.QueueExists(QueueName))
- {
- namespaceManager.CreateQueue(QueueName);
- }
- // Initialize the connection to Service Bus Queue
- _client = QueueClient.CreateFromConnectionString(connectionString, QueueName);
- <appSettings>
- <!-- Service Bus specific app setings for messaging connections -->
- <add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedSecretIssuer=owner;SharedSecretValue=[your secret]" />
- </appSettings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement