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

Ensure there's only one request per topic per consumer instance out at a given time #3

Closed

Conversation

@kauffecup
Copy link

@kauffecup kauffecup commented Jan 13, 2016

Add _topicGetMap to ConsumerInstance. Every time ConsumerInstance.get() is issued - keep track of the promise for that topic. If a new get is issued for the same topic, return the existing promise. Do necessary cleanup when request is finished.

Without this, you get errors that look like:

[Error: Request returned status code 500 but it was not in the accepted list. The
REST API responded with the following message: Another request is in progress
for consumer "test:test1". Request may be retried when response is received for
the previous request.]
…t a given time

Add `_topicGetMap` to ConsumerInstance. Every time `ConsumerInstance.get()` is issued - keep track of the promise for that topic. If a new get is issued for the same topic, return the existing promise. Do necessary cleanup when request is finished
@niall-weedon
Copy link
Contributor

@niall-weedon niall-weedon commented Mar 17, 2016

Hi @kauffecup, thanks for your contribution. We've merged your changes with our private repository - expect to see your changes in the public repository soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.