Queue provider: Azure Service Bus
Overview
This section describes how to configure Azure Service Bus for use with RPI. Please follow the steps below:
Set up your service bus namespace in Azure and obtain the connection string.
In a web browser, log into the Windows Azure portal (https://portal.azure.com).
Once you have successfully logged into the portal, search for the “Service Bus” resource and click Create.
Provide the Namespace , choose your Subscription, Resource group, location and pricing tier:
![](../__attachments/3904997947/att_11_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Once the namespace is created it will appear in the list of Service Bus namespaces Select the record.
Click on Shared access policies (located under Settings):
![](../__attachments/3904997947/att_35_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
In the “SAS Policy: RootManageSharedAccessKey” panel, make sure Send and Listen are checked. Ask your Azure account admin to enable these options if they are not checked. They will be used when configuring the queue provider in RPI:
![](../__attachments/3904997947/att_25_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Use the Primary Connection string to configure the Connection string of the RPI Azure Service bus queue provider.
Set up an RPI Azure Service Bus queue provider to use your newly created Azure message bus. Start by logging into the RPI client as an Admin user and navigate to Configuration -> Queue Providers.
Add a new Azure Service Bus provider. Provide a name, select the ‘Use this queue provider’ option and paste in the Connection String copied above.
![](../__attachments/3904997947/att_32_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Save the record and click on the ‘Connectivity test’ button to verify connectivity to the service bus. Once connectivity has been verified, click on the ‘Copy JSON configuration to clipboard’ button and record the JSON configuration details. This will be used in the appsettings.json.config file for the RPI Realtime API site:
Navigate to Configuration -> System Configuration and set the value for following 3 queue related parameters. Please note that the queues need not already exist within the Azure service bus namespace as RPI will create the queues automatically if they do not exist:
FormSubmissionQueuePath
WebCacheQueuePath
WebEventQueuePath
Record the names supplied as they will be needed for the web.config file within the RPI Realtime API site.
Configure the Realtime API appsettings.json.config file to reference the new queue provider and queues created in the sections above. Start by opening the appsettings.json.config file at the root of the RPI Realtime API web site directory in a text editor.
Locate the ClientQueueSettings Node:
![](../__attachments/3904997947/att_18_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Paste the contents of the queue JSON configuration details copied earlier between the tags.
Locate the following settings within the appsettings.json.config file and set respectively to match exactly the three system configuration values defined above in section 2f:
In this section, enter the value set at system configuration parameter Form
SubmissionQueuePath:"FormQueuePath": "RPIWebFormSubmissionMerv"
In this section, enter the value set at system configuration parameter WebCacheQueuePath:
"CacheOutputQueuePath": "RPIWebCacheDataMerv"
In this section, enter the value set at system configuration parameter WebEventQueuePath:
"EventsQueuePath": "RPIWebEventsMerv"
This completes the steps necessary to configure RPI to use Azure Service Bus message queues. You can validate that the queues have been created successfully from the Windows Azure portal. They will be listed under QUEUES within the namespace created in the first section above:
![](../__attachments/3904997947/att_2_for_3897589833.png?inst-v=c3007bf4-8f91-43d3-9633-90859273c945)
Permissions
For Azure Cloud Identity authentication, the following roles must be added to the user:
Azure Service Bus Data Owner
Azure Service Bus Data Receiver
Azure Service Bus Data Sender