Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify encoding of kafka header keys and values and message key #572

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions kafka-protocol-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ _structured_ mode with the JSON event format.

The 'key' attribute is populated by a partitionKeyExtractor function. The
partitionKeyExtractor is a protocol specific function that contains bespoke
logic to extract and populate the value. A default implementation of the
extractor will use the [Partitioning](extensions/partitioning.md) extension
value.
logic to extract and populate the value. The key attribute MUST be encoded
as UTF-8 string both in the Kafka message and in the CloudEvents extension.
A default implementation of the extractor will use the
[Partitioning](extensions/partitioning.md) extension value.

### 3.2. Binary Content Mode

Expand All @@ -148,7 +149,8 @@ message.
All [CloudEvents][ce] attributes and
[CloudEvent Attributes Extensions](primer.md#cloudevent-attribute-extensions)
with exception of `data` MUST be individually mapped to and from the Header
fields in the Kafka message.
fields in the Kafka message. Both header keys and header values MUST be encoded
as UTF-8 strings.

##### 3.2.3.1 Property Names

Expand Down