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 PubSub: Propagate partition key to DLT #3368

Merged
merged 11 commits into from May 15, 2024

Conversation

denisbchrsk
Copy link
Contributor

Description

Added support for partition key propagation to DLT when subscribing (including bulk subscribe) to a Kafka pubsub, by utilizing the enriched metadata from the subscribed message and use it to determine the partition key of the message produced to the DLT (utilizing the metadata which is added to the message in the doCallback and doBulkCallback according to this merged PR #3289).

Another change which was done in order to implement the partition key propagation when using bulk subscribe in Kafka, was passing each individual message's metadata to the DLT.
Previously, only the bulk request's metadata was considered when publishing to DLT, changing that allowed similar implementation added to Publish to be viable in BulkPublish as well.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #2227

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

…afka pubsub

Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
… using bulk subscribe in kafka pubsub, and fixed entry metadata not passed to the DLT

Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
@denisbchrsk denisbchrsk requested review from a team as code owners February 28, 2024 15:33
Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
@denisbchrsk denisbchrsk force-pushed the feature/kafka_dlt_partition_key branch from e680c82 to 08ae60f Compare February 28, 2024 16:11
Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
@berndverst berndverst added this to the v1.14 milestone Mar 7, 2024
@denisbchrsk
Copy link
Contributor Author

Seems like the certification tests for RabbitMQ and MQTT3 are failing, I assume that this is a known issue?

Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
Signed-off-by: denisbchrsk <155584191+denisbchrsk@users.noreply.github.com>
@denisbchrsk
Copy link
Contributor Author

Hey @yaron2 @berndverst,
This PR has been ready for quite a while now without being reviewed, is it possible to review this soon?

The issue with the partition key not being propagated to the DLT in Kafka pubsub is a blocker for us from using Dapr's Kafka pubsub, as DLTs are important for us to be able to handle errors separately.

@yaron2
Copy link
Member

yaron2 commented Apr 16, 2024

Hey @yaron2 @berndverst, This PR has been ready for quite a while now without being reviewed, is it possible to review this soon?

The issue with the partition key not being propagated to the DLT in Kafka pubsub is a blocker for us from using Dapr's Kafka pubsub, as DLTs are important for us to be able to handle errors separately.

This will be reviewed soon and if accepted will make it to the upcoming release

@yaron2 yaron2 merged commit 4e4aa26 into dapr:main May 15, 2024
85 of 91 checks passed
@yaron2
Copy link
Member

yaron2 commented May 15, 2024

Thanks for your contribution @denisbchrsk

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.

Kafka pubsub should propagate partition key to DLT
3 participants