Closed hiroya8649 closed 2 years ago
Looking at the code, it seems that concurrent calls to produce() are not handled correctly. The sequence number for the partition is not being read or updated at the right time, which means subsequent (concurrent) messages to the same partition are sent with the same sequence number. These will get ignored by the broker as it will interpret them as repeats.
Describe the bug Said the # of the partitions = N. R > N
Produce R requests, but only the first N requests are caught by consumer , and the left R - N requests are gone. And I don't get any rejections. (the
await Promise.all(promises)
in producer doesn't throw any errors) If I set idempotent to false then I can catch exactly R requests with consumer.To Reproduce https://github.com/hiroya8649/kafka-report
Expected behavior If set idempotent to true, the consumer should catch the same amount of requests send by the producer.
Observed behavior Produce 5 requests (R = 5, N = 3), here is the result of producer and consumer:
producer
consumer
Environment: