-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Is there a way for a publisher in the delivery callback to know which partition it was sent to? #38
Comments
Is that what the topic_set_partitioner_cb() is for? unclear to me. |
The broker does not decide on the partition, that is up to the producer. If you produce a message through librdkafka with the partition set to -1 (or RD_KAFKA_PARTITION_UA (unavailable)) then the configured partitioner will be called for the message. There is unfortunately no support in the delivery report callback (dr_cb) for seeing which partition was used. |
Please reopen this issue if anything is unclear. |
If I am letting the broker determine the partition based on key, is there a way the publisher can tell which partition was chosen? I'd like to log it.
The text was updated successfully, but these errors were encountered: