Skip to content

Commit 6730165

Browse files
committed
Separating articles
1 parent 5a5f417 commit 6730165

14 files changed

+130
-79
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Configure Event Hubs with Microsoft Purview for Atlas Kafka topics
3+
description: Configure Event Hubs to send/receive events to/from Microsoft Purview's Apache Atlas Kafka topics.
4+
ms.topic: how-to
5+
author: nayenama
6+
ms.author: nayenama
7+
ms.service: purview
8+
ms.subservice: purview-data-catalog
9+
ms.devlang: csharp
10+
ms.date: 12/13/2022
11+
ms.custom: mode-other
12+
---
13+
14+
# Configure Event Hubs with Microsoft Purview to send and receive Atlas Kafka topics messages
15+
16+
This article will show you you how to configure Microsoft Purview to be able to send and receive *Atlas Kafka* topics events with Azure Event Hubs.
17+
18+
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.](manage-kafka-dotnet.md)
19+
20+
## Prerequisites
21+
22+
To configure your environment, you need certain prerequisites in place:
23+
24+
- **A Microsoft Azure subscription**. To use Azure services, including Event Hubs, you need an Azure subscription. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/) or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com).
25+
- An active [Microsoft Purview account](create-catalog-portal.md).
26+
- An [Azure Event Hubs](../event-hubs/event-hubs-create.md) namespace with an Event Hubs.
27+
28+
## Configure Event Hubs
29+
30+
To send or receive Atlas Kafka topics messages, you'll need to configure at least one Event Hubs namespace.
31+
32+
>[!NOTE]
33+
> If your Microsoft Purview account was created before December 15th, 2022 you may have a managed Event Hubs resource already associated with your account.
34+
> You can check in **Managed Resources** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
35+
> :::image type="content" source="media/configure-event-hubs-for-kafka/enable-disable-event-hubs.png" alt-text="Screenshot showing the Event Hubs namespace toggle highlighted on the Managed resources page of the Microsoft Purview account page in the Azure portal.":::
36+
>
37+
> - If you do not see this resource, or it is **disabled**, follow the steps below to configure your Event Hubs.
38+
>
39+
> - 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](https://azure.microsoft.com/pricing/details/purview/).) If you want to manage your own Event Hubs account, you must first **disable** this feature and follow the steps below.
40+
> **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**.
41+
42+
## Event Hubs permissions
43+
44+
To authenticate with your Event Hubs, you can either use:
45+
46+
- Microsoft Purview managed identity
47+
- [User assigned managed identity](manage-credentials.md#create-a-user-assigned-managed-identity) - only available when configuring namespaces after account creation.
48+
49+
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.
50+
51+
## Configure Event Hubs to publish messages to Microsoft Purview
52+
53+
1. Navigate to **Kafka configuration** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
54+
55+
:::image type="content" source="media/configure-event-hubs-for-kafka/select-kafka-configuration.png" alt-text="Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.":::
56+
57+
1. Select **Add configuration** and **Hook configuration**.
58+
>[!NOTE]
59+
> You can add as many hook configurations as you need.
60+
61+
:::image type="content" source="media/configure-event-hubs-for-kafka/add-hook-configuration.png" alt-text="Screenshot showing the Kafka configuration page with add configuration and hook configuration highlighted.":::
62+
63+
1. 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.
64+
65+
>[!TIP]
66+
> You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.
67+
68+
:::image type="content" source="media/configure-event-hubs-for-kafka/configure-hook-event-hub.png" alt-text="Screenshot showing the hook configuration page, with all values filled in.":::
69+
70+
1. Select **Save**. It will take a couple minutes for your configuration to complete.
71+
72+
1. Once configuration is complete, you can begin the steps to [publish messages to Microsoft Purview](manage-kafka-dotnet.md#publish-messages-to-microsoft-purview).
73+
74+
### Configure Event Hubs to receive messages from Microsoft Purview
75+
76+
1. Navigate to **Kafka configuration** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
77+
78+
:::image type="content" source="media/configure-event-hubs-for-kafka/select-kafka-configuration.png" alt-text="Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.":::
79+
80+
1. 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](#receive-microsoft-purview-messages).
81+
>[!NOTE]
82+
> Only one *Notification* Event Hubs can be configured at a time.
83+
84+
:::image type="content" source="media/configure-event-hubs-for-kafka/type-notification.png" alt-text="Screenshot showing the Kafka configuration option with a notification type configuration ready.":::
85+
86+
1. If there isn't a **Notification** configuration already listed, select **Add configuration** and **Notification configuration**.
87+
88+
:::image type="content" source="media/configure-event-hubs-for-kafka/add-notification-configuration.png" alt-text="Screenshot showing the Kafka configuration page with add configuration and notification configuration highlighted.":::
89+
90+
1. 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.
91+
92+
>[!TIP]
93+
> You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.
94+
95+
:::image type="content" source="media/configure-event-hubs-for-kafka/configure-notification-event-hub.png" alt-text="Screenshot showing the notification hub configuration page, with all values filled in.":::
96+
97+
1. Select **Save**. It will take a couple minutes for your configuration to complete.
98+
99+
1. Once configuration is complete, you can begin the steps to [receive Microsoft Purview messages](manage-kafka-dotnet.md#receive-microsoft-purview-messages).
100+
101+
## Remove configured Event Hubs
102+
103+
To remove configured Event Hubs namespaces, you can follow these steps:
104+
105+
1. Search for and open your Microsoft Purview account in the [Azure portal](https://portal.azure.com).
106+
1. Select **Kafka configuration** under settings on your Microsoft Purview account page in the Azure portal.
107+
1. Select the Event Hubs you want to disable. (Hook hubs send messages to Microsoft Purview. Notification hubs receive notifications.)
108+
1. Select **Remove** to save the choice and begin the disablement process. This can take several minutes to complete.
109+
:::image type="content" source="media/configure-event-hubs-for-kafka/select-remove.png" alt-text="Screenshot showing the Kafka configuration page of the Microsoft Purview account page in the Azure portal with the remove button highlighted.":::
110+
111+
## Next steps
112+
113+
- [Publish and process Atlas Kafka topics messages using your Event Hubs](manage-kafka-dotnet.md)
114+
- [Event Hubs samples in GitHub](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/eventhub/Azure.Messaging.EventHubs/samples)
115+
- [Event processor samples in GitHub](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/eventhub/Azure.Messaging.EventHubs.Processor/samples)
116+
- [An introduction to Atlas notifications](https://atlas.apache.org/2.0.0/Notifications.html)

articles/purview/create-microsoft-purview-portal.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ For more information about the governance capabilities of Microsoft Purview, for
5959
1. On **Configuration** tab you can choose to configure Event Hubs namespaces to programmatically monitor your Microsoft Purview account using Event Hubs and Atlas Kafka.
6060
- [Steps to configure Event Hubs namespaces](manage-kafka-dotnet.md#configure-event-hubs)
6161
- [Send and receive Atlas Kafka topics messages](manage-kafka-dotnet.md)
62-
- [Publish and consume events for Microsoft Purview with Atlas Kafka](concept-best-practices-automation.md#streaming-apache-atlas)
6362

6463
:::image type="content" source="media/create-catalog-portal/configure-kafka-event-hubs.png" alt-text="Screenshot showing the Event Hubs configuration page in the Create Microsoft Purview account window.":::
6564

6665
>[!NOTE]
67-
> These options can be configured after you have created your account in **Kafka configuration** under settings on your Microsoft Purview account page in the Azure Portal.
66+
> [These options can be configured after you have created your account](configure-event-hubs-for-kafka.md) in **Kafka configuration** under settings on your Microsoft Purview account page in the Azure Portal.
6867
>
6968
> :::image type="content" source="media/create-catalog-portal/select-kafka-configuration.png" alt-text="Screenshot showing Kafka configuration option on the Microsoft Purview account page in the Azure Portal.":::
7069

articles/purview/manage-kafka-dotnet.md

Lines changed: 7 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.author: nayenama
77
ms.service: purview
88
ms.subservice: purview-data-catalog
99
ms.devlang: csharp
10-
ms.date: 12/09/2022
10+
ms.date: 12/13/2022
1111
ms.custom: mode-other
1212
---
1313

@@ -24,85 +24,15 @@ To follow this quickstart, you need certain prerequisites in place:
2424
- **A Microsoft Azure subscription**. To use Azure services, including Event Hubs, you need an Azure subscription. If you don't have an Azure account, you can sign up for a [free trial](https://azure.microsoft.com/free/) or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com).
2525
- **Microsoft Visual Studio 2022**. The Event Hubs client library makes use of new features that were introduced in C# 8.0. You can still use the library with previous C# versions, but the new syntax won't be available. To make use of the full syntax, it's recommended that you compile with the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher and [language version](/dotnet/csharp/language-reference/configure-language-version#override-a-default) set to `latest`. If you're using a Visual Studio version prior to Visual Studio 2019, it doesn't have the tools needed to build C# 8.0 projects. Visual Studio 2022, including the free Community edition, can be downloaded [here](https://visualstudio.microsoft.com/vs/).
2626
- An active [Microsoft Purview account](create-catalog-portal.md).
27-
- An [Azure Event Hubs](../event-hubs/event-hubs-create.md) namespace with an Event Hubs.
28-
29-
## Configure Event Hubs
30-
31-
To send or receive Atlas Kafka topics messages, you'll need to configure at least one Event Hubs namespace.
32-
33-
>[!NOTE]
34-
> If your Microsoft Purview account was created before December 15th, 2022 you may have a managed Event Hubs resource already associated with your account.
35-
> You can check in **Managed Resources** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
36-
> :::image type="content" source="media/manage-eventhub-kafka-dotnet/enable-disable-event-hubs.png" alt-text="Screenshot showing the Event Hubs namespace toggle highlighted on the Managed resources page of the Microsoft Purview account page in the Azure portal.":::
37-
>
38-
> - If you do not see this resource, or it is **disabled**, follow the steps below to configure your Event Hubs.
39-
>
40-
> - 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](https://azure.microsoft.com/pricing/details/purview/).) If you want to manage your own Event Hubs account, **disable** this feature and follow the steps below.
41-
> **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**.
42-
43-
### Event Hubs permissions
44-
45-
To authenticate with your Event Hubs, you can either use:
46-
47-
- Microsoft Purview managed identity
48-
- [User assigned managed identity](manage-credentials.md#create-a-user-assigned-managed-identity) - only available when configuring namespaces after account creation.
49-
50-
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.
51-
52-
### Configure Event Hubs to publish messages to Microsoft Purview
53-
54-
1. Navigate to **Kafka configuration** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
55-
56-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/select-kafka-configuration.png" alt-text="Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.":::
57-
58-
1. Select **Add configuration** and **Hook configuration**.
59-
>[!NOTE]
60-
> You can add as many hook configurations as you need.
61-
62-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/add-hook-configuration.png" alt-text="Screenshot showing the Kafka configuration page with add configuration and hook configuration highlighted.":::
63-
64-
1. 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.
65-
66-
>[!TIP]
67-
> You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.
68-
69-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/configure-hook-event-hub.png" alt-text="Screenshot showing the hook configuration page, with all values filled in.":::
70-
71-
1. Select **Save**. It will take a couple minutes for your configuration to complete.
72-
73-
1. Once configuration is complete, you can begin the steps to [publish messages to Microsoft Purview](#publish-messages-to-microsoft-purview).
74-
75-
### Configure Event Hubs to receive messages from Microsoft Purview
76-
77-
1. Navigate to **Kafka configuration** under settings on your Microsoft Purview account page in the [Azure portal](https://portal.azure.com).
78-
79-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/select-kafka-configuration.png" alt-text="Screenshot showing the Kafka configuration option in the Microsoft Purview menu in the Azure portal.":::
80-
81-
1. 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](#receive-microsoft-purview-messages).
82-
>[!NOTE]
83-
> Only one *Notification* Event Hubs can be configured at a time.
84-
85-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/type-notification.png" alt-text="Screenshot showing the Kafka configuration option with a notification type configuration ready.":::
86-
87-
1. If there isn't a **Notification** configuration already listed, select **Add configuration** and **Notification configuration**.
88-
89-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/add-notification-configuration.png" alt-text="Screenshot showing the Kafka configuration page with add configuration and notification configuration highlighted.":::
90-
91-
1. 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.
92-
93-
>[!TIP]
94-
> You can use the same Event Hubs namespace more than once, but each configuration will need its own Event Hubs.
95-
96-
:::image type="content" source="media/manage-eventhub-kafka-dotnet/configure-notification-event-hub.png" alt-text="Screenshot showing the notification hub configuration page, with all values filled in.":::
97-
98-
1. Select **Save**. It will take a couple minutes for your configuration to complete.
99-
100-
1. Once configuration is complete, you can begin the steps to [receive Microsoft Purview messages](#receive-microsoft-purview-messages).
27+
- [An Event Hubs configured with your Microsoft Purview account to sent and receive messages](configure-event-hubs-for-kafka.md):
28+
- Your account may already be configured. You can check your Microsoft Purview account in the [Azure portal](https://portal.azure.com) under **Settings**, **Kafka configuration**. If it is not already configured, [follow this guide](configure-event-hubs-for-kafka.md).
10129

10230
## Publish messages to Microsoft Purview
10331

10432
Let's create a .NET Core console application that sends events to Microsoft Purview via Event Hubs Kafka topic, **ATLAS_HOOK**.
10533

34+
To publish messages to Microsoft Purview, you'll need either a [managed Event Hubs](configure-event-hubs-for-kafka.md#configure-event-hubs), or [at least one Event Hubs with a hook configuration.](configure-event-hubs-for-kafka.md#configure-event-hubs-to-publish-messages-to-microsoft-purview).
35+
10636
## Create a Visual Studio project
10737

10838
Next create a C# .NET console application in Visual Studio:
@@ -307,6 +237,8 @@ Next create a C# .NET console application in Visual Studio:
307237

308238
Next learn how to write a .NET Core console application that receives messages from event hubs using an event processor. The event processor manages persistent checkpoints and parallel receptions from event hubs. This simplifies the process of receiving events. You need to use the ATLAS_ENTITIES event hub to receive messages from Microsoft Purview.
309239

240+
To receive messages from Microsoft Purview, you'll need either a [managed Event Hubs](configure-event-hubs-for-kafka.md#configure-event-hubs), or [an Event Hubs notification configuration.](configure-event-hubs-for-kafka.md#configure-event-hubs-to-receive-messages-from-microsoft-purview).
241+
310242
> [!WARNING]
311243
> Event Hubs SDK uses the most recent version of Storage API available. That version may not necessarily be available on your Stack Hub platform. If you run this code on Azure Stack Hub, you will experience runtime errors unless you target the specific version you are using. If you're using Azure Blob Storage as a checkpoint store, review the [supported Azure Storage API version for your Azure Stack Hub build](/azure-stack/user/azure-stack-acs-differences?#api-version) and in your code, target that version.
312244
>

0 commit comments

Comments
 (0)