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

Possible race condition in NConsumer#close #101

Open
denic opened this issue Mar 4, 2019 · 0 comments
Open

Possible race condition in NConsumer#close #101

denic opened this issue Mar 4, 2019 · 0 comments
Labels

Comments

@denic
Copy link

denic commented Mar 4, 2019

Hi,

I am using sinek's NConsumer to connect to Kafka and came across faulty behavior when trying to disconnect from the broker. It seems that 8fd1846 introduced a race condition between the disconnected event listener (when it calls NConsumer#reset) and checking the abort condition in NConsumer#_singeConsumeRecursive.

The result of this is, that the NConsumer continues trying to read messages from the disconnected node-rdkafka consumer.

{ Error: KafkaConsumer is not connected\n    at Function.createLibrdkafkaError [as create] (/home/node/event-client/node_modules/node-rdkafka/lib/error.js:261:10)\n    at /home/node/event-client/node_modules/node-rdkafka/lib/kafka-consumer.js:448:29\n  message: 'KafkaConsumer is not connected',\n  code: -172,\n  errno: -172,\n  origin: 'kafka' }

Thanks in advance!

@krystianity krystianity added the bug label Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants