Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Stop consumer from reading on connections closed by producer #49

Open
cw9 opened this issue Jul 2, 2018 · 0 comments
Open

Stop consumer from reading on connections closed by producer #49

cw9 opened this issue Jul 2, 2018 · 0 comments

Comments

@cw9
Copy link
Contributor

cw9 commented Jul 2, 2018

When there is a very slow consumer, the producer could fill up the tcp write buffer and time out on tcp writes, which will cause the producer to close the connection and recreate a new one.
But there is no way for consumer to know that the existing connection is closed, which means it will continue to read msg from the connection and work on the msg, although all of the work will be wasted as they won't be acked back to the producer, so the messages will be tried again.
It would be good to somehow detect the close of the connection and stop processing messages from it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant