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

Kafka: Add message key and other metadata as metadata in consumer #3289

Merged
merged 2 commits into from Jan 3, 2024

Conversation

passuied
Copy link
Contributor

@passuied passuied commented Dec 23, 2023

Description

Pass Message Key and other message metadata as metadata in Kafka.pubsub consumer.
Currently, only message value is passed to endpoint.

Issue reference

Fixes #2213

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation - N/A

@passuied passuied requested review from a team as code owners December 23, 2023 19:52
@passuied passuied force-pushed the feature/kafka-pubsub-consumer-key branch from 37ab449 to ba601df Compare December 23, 2023 19:55
@passuied passuied changed the title Add message key as header in consumer Add message key and other metadata as header in consumer Dec 23, 2023
@passuied passuied changed the title Add message key and other metadata as header in consumer Add message key and other metadata as metadata in consumer Dec 23, 2023
@passuied passuied force-pushed the feature/kafka-pubsub-consumer-key branch 3 times, most recently from 66722b7 to 0b87d21 Compare December 24, 2023 17:10
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
@passuied passuied force-pushed the feature/kafka-pubsub-consumer-key branch from 0b87d21 to dc695c0 Compare December 24, 2023 17:28
@passuied
Copy link
Contributor Author

passuied commented Dec 27, 2023

@dapr/maintainers-components-contrib, @berndverst, @yaron2, First contribution. Waiting for approval... What's the typical SLA?

@@ -28,6 +28,11 @@ import (

const (
key = "partitionKey"
keyMetadataKey = "__key"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note I chose the __ prefix convention to reduce chances of collision with other headers... The __ prefix is a common convention in kafka connect. Though I could make the prefix more specific (like __kafka.timestamp for instance

@ItalyPaleAle ItalyPaleAle added this to the v1.13 milestone Jan 3, 2024
@ItalyPaleAle ItalyPaleAle changed the title Add message key and other metadata as metadata in consumer Kafka: Add message key and other metadata as metadata in consumer Jan 3, 2024
@ItalyPaleAle ItalyPaleAle merged commit 007d0e0 into dapr:main Jan 3, 2024
87 checks passed
passuied added a commit to passuied/components-contrib that referenced this pull request Jan 3, 2024
…pr#3289)

Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass kafka record key and other metadata to pubsub subscribers
3 participants