tulios / kafkajs

A modern Apache Kafka client for node.js
https://kafka.js.org
MIT License
3.71k stars 525 forks source link

Problems when concurrently consume from the same topic to the same consumer group id. #1687

Closed Sang-Mook closed 4 months ago

Sang-Mook commented 4 months ago

I am currently trying to consume messages from Topic A using a consumer group with the ID 'test'. Topic A consists of 3 partitions.

There was no issue when consuming with just one node. However, to increase the consumption speed, I scaled up to 3 nodes and started consuming simultaneously. But when I try to consume simultaneously, errors occur at the connection stage, and it doesn't function properly. As a workaround, I am currently controlling the access, allowing one node to connect at a time. However, this defeats the purpose of having multiple partitions and seems contrary to the Kafka concept.

I am attaching the relevant logs and the code I used. What could be causing this issue?

solve it