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

Add retry and queue size on async producer #283

Closed
wants to merge 1 commit into from

Conversation

ashangit
Copy link

@ashangit ashangit commented Jan 5, 2015

Add retry on async producer in case of send failure. Default set to 3
retry with a back retry set to 300 ms

Add capabilities to limit the size of the async queue in order to avoid
having too much memory consumption by this queue if the async process
is not able to send messages fastly.

Add retry on async producer in case of send failure. Default set to 3
retry with a back retry set to 300 ms

Add capabilities to limit the size of the async queue in order to avoid
having too much memory consumption by this queue if the async process
is not able to send messages fastly.
log.exception("Unable to send message - retry {0}".format(i))
time.sleep(float(batch_send_retry_backoff_ms) / float(1000))
continue
break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this break be in the try?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the try or out the try do the same.
We continue if we face an exception or we break if no exception.

@toli
Copy link

toli commented May 12, 2015

What's the status of this PR? it's been 4+ months, same with #304
We are facing a similar problem at at work, and i'd prefer not to have custom patches and just use vanilla upstream code...

@dpkp - you mentioned something about Rdio having their own, perhaps you can get that committed to upstream? or get this patch in?

@dpkp
Copy link
Owner

dpkp commented May 13, 2015

I'd like to get #331 merged for this issue instead. If you have a second to review, would appreciate more eyeballs and/or testing.

@dpkp
Copy link
Owner

dpkp commented Jun 7, 2015

#331 is merged and supports this via async_queue_maxsize and async_queue_put_timeout configuration parameters to the producer

@dpkp dpkp closed this Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants