Get events from Azure Event Hubs into Real-Time hub

This article describes how to get events from an Azure event hub 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 Event Hubs namespace and an event hub if you don't have one.
  • You need to have appropriate permission to get access keys for the event hub. The event hub must be publicly accessible and not behind a firewall or secured in a virtual network.

Get events from an Azure event hub

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

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 Event Hubs from the drop-down list.

  3. For Subscription, select an Azure subscription that has the resource group with your event hub.

  4. For Resource group, select a resource group that has your event hub.

  5. For Region, select a location where your event hub is located.

  6. Now, move the mouse over the name of the event hub that you want to connect to Real-Time hub in the list of event hubs, 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 event hubs and the connect button for an event hub.

Configure connection settings and credentials

On the Connect page, in the Configure connection settings section, follow these steps:

  1. Select an event hub from your Event Hubs namespace.

    Screenshot that shows the Connect page with an event hub selected from the drop-down list.

  2. Select an access key for the Event Hubs namespace or the event hub.

    Screenshot that shows the Connect page with an access key selected from the drop-down list.

  3. If there's an existing connection to the event hub, it shows in the drop-down list for Connection. Select it. If not, select New connection to create a connection to the event hub.

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

    If there's an existing connection to your Azure event hub, you select that existing connection, and then move on to the Configure and connect to the Azure event hub resource section.

  4. In the popup window, all the fields (Event Hubs namespace, Event hub, Connection name, Authentication kind, Shared access key name, and Shared access key value) should be automatically filled. You might want to update the connection name. For example: mynamespace-myehub-connection. Select Connect at the bottom of the window. You see the connection in the Connection drop-down list. The next time you launch the Connection wizard for the same event hub, you see this connection in the drop-down list.

    Screenshot that shows the Connect page with the connection you created.

    Skip the Data sources page section, and continue to the Configure and connect to the Azure event hub resource section.

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 Event Hubs tile.

    Screenshot that shows the selection of Azure Event Hubs as the source type in the Data sources page.

    Now, follow instructions from the Connect to an Azure event hub section.

Configure connection settings and credentials

  1. To create a connection to an event hub, 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 Configure and connect to the Azure event hub resource section.

    Screenshot that shows the Connect page with an existing connection to an Azure event hub.

  2. In the Connection settings section, do these steps:

    1. Enter the name of the Event Hubs namespace.

    2. Enter the name of the event hub.

      Screenshot that shows the connection settings with Event Hubs namespace and the event hub specified.

  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 Connect page one for Azure Event Hubs connector.

      Now, continue to Configure and connect to the Azure event hub resource.

Configure and connect to the Azure event hub

  1. Now, on the Connect page of wizard, for Consumer group, enter the name of the consumer group. By default, $Default is selected, which is the default consumer group for the event hub.

  2. For Data format, select a data format of the incoming real-time events that you want to get from your Azure event hub.

  3. In the Stream details section to the right, select the Fabric workspace where you want to save the eventstream that the Wizard is going to create.

  4. For eventstream name, enter a name for the eventstream. The wizard creates an eventstream with the selected event hub as a source.

  5. 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.

  6. Select Next at the bottom of the page.

    Screenshot that shows the Connect page two for Azure Event Hubs connector.

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

    Screenshot that shows the Review + connect page for Azure Event Hubs 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 event hub 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.

    Screenshot that shows the Real-Time hub All data streams page with the stream you just created.

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