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

The custom partitioner callbacks are not invoked #26

Open
didier-wenzek opened this issue Aug 25, 2020 · 0 comments
Open

The custom partitioner callbacks are not invoked #26

didier-wenzek opened this issue Aug 25, 2020 · 0 comments

Comments

@didier-wenzek
Copy link
Owner

The partitioner callback set when a topic producer is created is not used when messages are produced with no partition assigned.

Setting a partitioner callback as in:

let partitioner_callback partition_cnt key = Some ((Hashtbl.hash key) mod partition_cnt) in
let topic = Kafka.new_topic ~partitioner_callback producer topic_name options in                                                                                                                                 
Kafka.produce topic ~key msg

we expect that the partitioner_callback is called for each message produced without a partition.
Actually, the custom callback is never invoked and the partition is assigned using the partitioner set by the partitioner property

didier-wenzek added a commit that referenced this issue Aug 25, 2020
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

No branches or pull requests

1 participant