-
Notifications
You must be signed in to change notification settings - Fork 140
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
Example Client: Implementation of a Consumer with reconnection support #40
Comments
@andygrunwald Now that we understood what happened in #18 I think the example you propose can be just like an extension to the example we made in the documentation on how to handle channels for NotifyClose to avoid the deadlock for a consumer? |
Sure! good enough! Thanks @andygrunwald |
This gives an example of auto-reconnection as well: |
@andygrunwald any updates with your example client? |
@metalrex100 Still on my list. My client is working in production since quite some time. Will check if I can make some time in the next days to push it back. |
example_client_test.go
shows a great way how to build a Producer with reconnection support.The Consuming part is not covering the reconnection support:
amqp091-go/example_client_test.go
Lines 257 to 274 in 51fade5
Even if reconnection support is mentioned as a non-goal for the library itself, I do think showcasing this in the example might be a good thing.
Right now, the implementation is only possible with a hack involved.
Mainly due to these two issues:
These deadlocks prevent the consumer delivery channel to be closed during an unexpected connection loss (e.g., when the RabbitMQ server goes down).
The text was updated successfully, but these errors were encountered: