Skip to content

Commit 9e5c514

Browse files
Merge pull request #215891 from spelluru/ehubkafka1025
event hubs kafka - clarification
2 parents 67c29a4 + 8fb3070 commit 9e5c514

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

articles/event-hubs/event-hubs-exchange-events-different-protocols.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Event Hubs - Exchange events using different protocols
33
description: This article shows how consumers and producers that use different protocols (AMQP, Apache Kafka, and HTTPS) can exchange events when using Azure Event Hubs.
44
ms.topic: article
5-
ms.date: 09/20/2021
5+
ms.date: 10/25/2022
66
ms.devlang: csharp, java
77
ms.custom: devx-track-csharp
88
---
@@ -127,6 +127,22 @@ For Kafka consumers that receive properties from AMQP or HTTPS producers, use th
127127
As a best practice, we recommend that you include a property in messages sent via AMQP or HTTPS. The Kafka consumer can use it to determine whether header values need AMQP deserialization. The value of the property is not important. It just needs a well-known name that the Kafka consumer can find in the list of headers and
128128
adjust its behavior accordingly.
129129

130+
> [!NOTE]
131+
> The Event Hubs service natively converts some of the EventHubs specific [AmqpMessage properties](http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties) to [Kafka’s record headers](https://kafka.apache.org/32/javadoc/org/apache/kafka/common/header/Headers.html) as **strings**. Kafka message header is a list of <key, value> pairs where key is string and value is always a byte array. For these supported properties, the byte array will have an UTF8encoded string.
132+
>
133+
> Here is the list of immutable properties that Event Hubs support in this conversion today. If you set values for user properties with the names in this list, you don’t need to deserialize at the Kafka consumer side.
134+
>
135+
> - message-id
136+
> - user-id
137+
> - to
138+
> - reply-to
139+
> - content-type
140+
> - content-encoding
141+
> - creation-time
142+
143+
144+
145+
130146
### AMQP to Kafka part 1: create and send an event in C# (.NET) with properties
131147
```csharp
132148
// Create an event with properties "MyStringProperty" and "MyIntegerProperty"

0 commit comments

Comments
 (0)