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

Robust Connection example #91

Open
jmcarter opened this issue Nov 18, 2020 · 4 comments
Open

Robust Connection example #91

jmcarter opened this issue Nov 18, 2020 · 4 comments

Comments

@jmcarter
Copy link

Hi,

This is more of a question than an issue - is it possible to be able to manage a long-lived connection such that a reconnection can be immediately attempted if the channel/connection is closed?

I see the robust consumer example, but nothing for a connection that maybe used just for publishing. I don't see the ability to add any callbacks for a closed connection or a way to block the current thread until there's an error on the connection/channel, or maybe I'm just missing something.

Thanks for any help in advance.

@eandersson
Copy link
Owner

This isn't currently supported, but not a bad idea. The problem is that a channel event is in reality triggered when a function is executed, especially if it is a connection level event.

Maybe for publishing something like amqpstorm-pool is a better pattern? It would allow you to use a "pool" of connections, and if one is bad just use the next connection?
https://github.com/eandersson/amqpstorm-pool

@frankiedrake
Copy link

Having the same question, would be great to have some reconnactable ability "out-of-the-box" that will try to publish a message and recover the connection/channel in case of error in background

@eandersson
Copy link
Owner

Having the same question, would be great to have some reconnactable ability "out-of-the-box" that will try to publish a message and recover the connection/channel in case of error in background

Are you just looking for something similar to the robust consumer example, but for publishing, or would prefer something backed into the library?

@sunu
Copy link

sunu commented Apr 22, 2022

I would love to see an example similar to the robust consumer example for publishing.

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

No branches or pull requests

4 participants