Closed simhan95 closed 2 years ago
You need to have compatible partitioners in all producers producing to the same topic.
librdkafka has, for historical reasons, a non-java-compatible default partitioner, but you can easily change to the java-compatible murmur2_random partitioner by configuring partitioner=murmur2_random
.
There's hopefully something similar for kafkajs.
Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ
Do NOT create issues for questions, use the discussion forum: https://github.com/edenhill/librdkafka/discussions
Description
The c++ producer using librdkafka producing messages on a topic name and key, is produced to a partition which is not same as a nodejs producer (kafka library) producing on the same topic and key.
We see, consumers written in nodejs (kafkajs library) consuming messages on different partition from messages produced from c++ librdkafka and from nodejs producer ( through kafkajs).
How to reproduce
How we resolved this:
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
<REPLACE with e.g., v0.10.5 or a git sha. NOT "latest" or "current">
<REPLACE with e.g., 0.10.2.3>
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
<REPLACE with e.g., Centos 5 (x64)>
debug=..
as necessary) from librdkafka