Get events from Azure Service Bus into Real-Time hub (preview)

This article describes how to get events from an Azure Service Bus queue or a topic's subscription into Real-Time hub.

Prerequisites

  • Access to a workspace in the Fabric capacity license mode (or) the Trial license mode with Contributor or higher permissions.
  • Create an Azure Service Bus namespace, and create a queue and a topic with a subscription if you don't have one.
  • You need to have appropriate permission to get access keys for the Service Bus namespace. The namespace must be publicly accessible and not behind a firewall or secured in a virtual network.

Get events from Azure Service Bus

You can get events from an Azure Service Bus into Real-Time hub in one of the ways:

Data sources page

  1. Sign in to Microsoft Fabric.

  2. Select Real-Time on the left navigation bar.

  3. On the Real-Time hub page, select + Data sources under Connect to on the left navigation menu. You can also get to the Data sources page from All data streams or My data streams pages by selecting the + Connect data source button in the top-right corner.

    Screenshot that shows how to launch Connect to data source experience.

  1. On the Data sources page, select Microsoft sources category at the top, and then select Connect on the Azure Service Bus tile.

    Screenshot that shows the selection of Azure Service Bus as the source type in the Data sources page.

    Now, follow instructions from the Connect to Azure Service Bus section.

Microsoft sources page

  1. In Real-Time hub, select Microsoft sources on the left navigation menu. You can use the search box to the type your resource name or use filters (Source, Subscription, Resource group, Region) to search for your resource.

  2. For Source at the top, select Azure Service Bus from the drop-down list.

  3. For Subscription, select an Azure subscription that has the resource group with your queue to topic's subscription.

  4. For Resource group, select a resource group that has your queue or topic's subscription.

  5. For Region, select a location where your Service Bus queue or topic's subscription is located.

  6. Now, move the mouse over the name of the Service Bus queue that you want to connect to Real-Time hub in the list of Service Bus namespaces, and select the Connect button, or select ... (ellipsis), and then select Connect data source.

    Screenshot that shows the Microsoft sources page with filters to show Service Bus namespaces and the connect button for a namespace.

Connect to Azure Service Bus

  1. To create a connection to a Service Bus namespace, on the Connect page, select New connection.

    Screenshot that shows the Connect page with the New connection link highlighted.

    If there's an existing connection to your Azure event hub, you select that existing connection as shown in the following image, and then move on to the step to configure the data format.

    Screenshot that shows the Connect page with an existing connection to an Azure Service Bus.

  2. In the Connection settings section, for Host Name, enter the host name for your Service Bus namespace. You can get the host name for the namespace from the Overview page of your Service Bus namespace in the Azure portal. It's in the form of myservicebusnamespace.servicebus.windows.net.

    Screenshot that shows the connection settings with Service Bus namespace.

  3. In the Connection credentials section, do these steps:

    1. For Connection name, enter a name for the connection to the event hub.

    2. For Authentication kind, confirm that Shared Access Key is selected.

    3. For Shared Access Key Name, enter the name of the shared access key.

    4. For Shared Access Key, enter the value of the shared access key.

    5. Select Connect at the bottom of the page.

      Screenshot that shows the Connection credentials section of the Connect page one for Azure Service Bus connector.

  4. Now, on the Connect page of wizard, in the Configure Azure Service Bus Source section, do these steps:

    1. For Service Bus Type, select Queue or Topic.

    2. If you select Queue for the type, enter the name of the Service Bus queue.

    3. If you select Topic for the type, enter the name of the Service Bus topic and name of the subscription to the topic.

      Screenshot that shows the Configure Azure Service Bus Source section of the Connect page one for Azure Service Bus connector.

  5. In the Stream details section to the right, follow these steps:

    1. Select the Fabric workspace where you want to save the eventstream that the Wizard is going to create.

    2. For eventstream name, enter a name for the eventstream. Select the Pencil button next to the eventstream name. The wizard creates an eventstream with the selected Service Bus queue or topic's subscription as a source.

    3. The Stream name is automatically generated for you by appending -stream to the name of the eventstream. You can see this stream on the Real-time hub All data streams page when the wizard finishes.

      Screenshot that shows the Stream details section of the Connect page one for Azure Service Bus connector.

  6. Select Next at the bottom of the page.

  7. On the Review + connect page, review settings, and select Connect.

    Screenshot that shows the Review + connect page for Azure Service Bus connector.

View data stream details

  1. On the Review + connect page, if you select Open eventstream, the wizard opens the eventstream that it created for you with the selected Service Bus resource as a source. To close the wizard, select Finish at the bottom of the page.

    Screenshot that shows the Review + connect page with links to open eventstream and close the wizard.

  2. You should see the stream on the All data streams and My data streams pages. For detailed steps, see View details of data streams in Fabric Real-Time hub.

To learn about consuming data streams, see the following articles: