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 support for producer #40

Closed
mahendra opened this issue Jul 3, 2013 · 3 comments
Closed

Add retry support for producer #40

mahendra opened this issue Jul 3, 2013 · 3 comments

Comments

@mahendra
Copy link
Collaborator

mahendra commented Jul 3, 2013

I feel, we must add some retry support for producer.

If client.send_produce_request() fails, because a broker (for a partition) goes down, we can simply do

  • conn.close() and
  • client.conns.pop(broker)
  • try sending the message again, possibly after a retry delay.

This will ensure that the new broker for a partition will come up and we can send the message again.

This can be done after #33 is merged.

@jimjh
Copy link
Contributor

jimjh commented Oct 4, 2013

My changes in #55 basically has the client reset its topics_to_broker dictionary when a socket error occurs, so that subsequent requests will trigger _load_metadata_for_topic. This allows the client to discover new leaders.

I support having a retry with good exponential back-off, but I don't know a good place to put it.

@mahendra
Copy link
Collaborator Author

mahendra commented Oct 9, 2013

@jimjh We can have it in producer.py/_send_upstream() - with your changes in #55, we can get a list of failed produce requests. We could keep it in a temporary buffer/queue and send it out later.

@dpkp dpkp added the producer label Aug 22, 2014
@dpkp dpkp added this to the 0.9.4 Release milestone Apr 6, 2015
@dpkp
Copy link
Owner

dpkp commented Jun 8, 2015

#331 and related prs are merged -- async producer should handle retries properly now.

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

3 participants