Configure Event Hubs with Microsoft Purview to send and receive Atlas Kafka topics messages

This article will show you how to configure Microsoft Purview to be able to send and receive Atlas Kafka topics events with Azure Event Hubs.

If you have already configured your environment, you can follow our guide to get started with the Azure.Messaging.EventHubs .NET library to send and receive messages.

Prerequisites

To configure your environment, you need certain prerequisites in place:

Configure Event Hubs

To send or receive Atlas Kafka topics messages, you'll need to configure at least one Event Hubs namespace.

Note

If your Microsoft Purview account was created before December 15th, 2022 you may have a managed Event Hubs resource already associated with your account. You can check in Managed Resources under settings on your Microsoft Purview account page in the Azure portal. Screenshot showing the Event Hubs namespace toggle highlighted on the Managed resources page of the Microsoft Purview account page in the Azure portal.

  • If you do not see this resource, or it is disabled, follow the steps below to configure your Event Hubs.

  • If it is enabled, you can continue to use this managed Event Hubs namespace if you prefer. (There is associated cost. See see the pricing page.) If you want to manage your own Event Hubs account, you must first disable this feature and follow the steps below. If you disable the managed Event Hubs resource you won't be able to re-enable a managed Event Hub resource. You will only be able to configure your own Event Hubs.

Event Hubs permissions

To authenticate with your Event Hubs, you can either use:

One of these identities will need at least contributor permissions on your Event Hubs to be able to configure them to use with Microsoft Purview.

Configure Event Hubs to publish messages to Microsoft Purview

  1. Navigate to Kafka configuration under settings on your Microsoft Purview account page in the Azure portal.

    Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.

  2. Select Add configuration and Hook configuration.

    Note

    You can add as many hook configurations as you need.

    Screenshot showing the Kafka configuration page with add configuration and hook configuration highlighted.

  3. Give a name to your hook configuration, select your subscription, an existing Event Hubs namespace, an existing Event Hubs to send the notifications to, the consumer group you want to use, and the kind of authentication you would like to use.

    Tip

    You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.

    Screenshot showing the hook configuration page, with all values filled in.

  4. Select Save. It will take a couple minutes for your configuration to complete.

  5. Once configuration is complete, you can begin the steps to publish messages to Microsoft Purview.

Configure Event Hubs to receive messages from Microsoft Purview

  1. Navigate to Kafka configuration under settings on your Microsoft Purview account page in the Azure portal.

    Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.

  2. If there's a configuration already listed as type Notification, Event Hubs is already configured, and you can begin the steps to receive Microsoft Purview messages.

    Note

    Only one Notification Event Hubs can be configured at a time.

    Screenshot showing the Kafka configuration option with a notification type configuration ready.

  3. If there isn't a Notification configuration already listed, select Add configuration and Notification configuration.

    Screenshot showing the Kafka configuration page with add configuration and notification configuration highlighted.

  4. Give a name to your notification configuration, select your subscription, an existing Event Hubs namespace, an existing Event Hubs to send the notifications to, the partitions you want to use, and the kind of authentication you would like to use.

    Tip

    You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.

    Screenshot showing the notification hub configuration page, with all values filled in.

  5. Select Save. It will take a couple minutes for your configuration to complete.

  6. Once configuration is complete, you can begin the steps to receive Microsoft Purview messages.

Remove configured Event Hubs

To remove configured Event Hubs namespaces, you can follow these steps:

  1. Search for and open your Microsoft Purview account in the Azure portal.
  2. Select Kafka configuration under settings on your Microsoft Purview account page in the Azure portal.
  3. Select the Event Hubs you want to disable. (Hook hubs send messages to Microsoft Purview. Notification hubs receive notifications.)
  4. Select Remove to save the choice and begin the disablement process. This can take several minutes to complete. Screenshot showing the Kafka configuration page of the Microsoft Purview account page in the Azure portal with the remove button highlighted.

Next steps