Edit

Share via


Add an MQTT topic as source in Real-Time hub (Preview)

This article describes how to add an MQTT topic as an event source in Fabric Real-Time hub.

MQTT is a publish-subscribe messaging transport protocol that was designed for constrained environments. It's the go-to communication standard for IoT scenarios due to efficiency, scalability, and reliability. Microsoft Fabric event streams allow you to connect to an MQTT broker, where messages in MQTT broker to be ingested into Fabric eventstream, and routed to various destinations within Fabric.

Note

This source is not supported in the following regions of your workspace capacity: West US3, Switzerland West. 

Prerequisites 

Before you start, you must complete the following prerequisites:

  • Access to the Fabric premium workspace with Contributor or higher permissions. 
  • Gather Username and password to connect to the MQTT broker.
  • Ensure that the MQTT broker is publicly accessible and not restricted by a firewall or a virtual network.

Data sources page

  1. Sign in to Microsoft Fabric.

  2. If you see Power BI at the bottom-left of the page, switch to the Fabric workload by selecting Power BI and then by selecting Fabric.

    Screenshot that shows how to switch to the Fabric workload.

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

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

  4. On the Real-Time hub page, select + Data sources under Connect to on the left navigation menu.

    Screenshot that shows the Data sources page in the Real-Time hub.

    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 the Connect data source button.

Select MQTT as data source type

On the Data sources page, search for MQTT, and select Connect on the MQTT tile.

Screenshot that shows the Data sources page with Connect on the MQTT tile selected.

Add MQTT topic as a source

  1. On the Connect page, select New connection.

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

    If there's an existing connection to your MQTT source, select that existing connection.

  2. In the Connection settings section,

    1. For MQTT Broker URL, enter the URL of your MQTT broker, starting with tcp://.

      Note

      The MQTT source currently supports only the PLAIN-TEXT MQTT protocol between your MQTT broker and eventstream.

    2. For Connection name, enter a name for the connection to the MQTT.

    3. Enter the Username and Password for the MQTT broker.

      Screenshot that shows the Connection settings section.

    4. Select Connect.

  3. Now, on the Connect page of the wizard, you must enter a single Topic name. Multiple topics aren't supported yet.

  4. For Version, only MQTT V5 is currently supported.

  5. Then, select Next

    Screenshot that shows the Configure MQTT data source section.

  6. On the Review + connect page, review settings, and select Add or Connect.

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 MQTT source. To close the wizard, select Close at the bottom of the page.

  2. In Real-Time hub, switch to the Data streams tab of Real-Time hub. Refresh the page. You should see the data stream created for you.

    For detailed steps, see View details of data streams in Fabric Real-Time hub.

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