-
Notifications
You must be signed in to change notification settings - Fork 798
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
pubsub: automatically recovering RabbitMQ connections #2958
Comments
I tried to reconnect, but it is not clear how to reset the saved error |
Just restart the application on any permanent error and it will reconnect. |
I can afford to reload the message receiving application Need to invent something |
We do already recreate the amqp channel as needed using You can create your own go-cloud/pubsub/rabbitpubsub/rabbit.go Line 93 in f28b854
Or, use the explicit constructor where you can provide the connection yourself: go-cloud/pubsub/rabbitpubsub/rabbit.go Line 154 in f28b854
Does that help? |
I supposed go-cloud/pubsub/rabbitpubsub/rabbit.go Line 62 in f28b854
https://pkg.go.dev/github.com/streadway/amqp#Connection.IsClosed |
I had no problems in this part. go-cloud/pubsub/rabbitpubsub/rabbit.go Line 121 in f28b854
after initialization |
Just create a new It won't work if you are using the default |
Thanks, I implemented everything on the application side, you need to do what kind of PR ? |
Describe the solution you'd like
Now the connection is established once during the initialization of the defaultDialer and there is no way to restore it without restarting the application
Describe alternatives you've considered
Automatically recovering RabbitMQ connections
Additional context
https://medium.com/@dhanushgopinath/automatically-recovering-rabbitmq-connections-in-go-applications-7795a605ca59
go-cloud/pubsub/rabbitpubsub/rabbit.go
Line 56 in f28b854
The text was updated successfully, but these errors were encountered: