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

Properly handle channel errors #16

Open
ghost opened this issue May 11, 2020 · 2 comments
Open

Properly handle channel errors #16

ghost opened this issue May 11, 2020 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented May 11, 2020

Per https://github.com/Surnet/graphql-amqp-subscriptions/pull/13/files#r422921589 , we should handle channel errors by attempting to re-establish them when possible. https://github.com/guidesmiths/rascal is a good example to go off of.

@chdanielmueller
Copy link
Member

Connection errors should not be handled.
I think this is something the user of this library should handle.
We could bubble up an error but everything else seems wrong since it could cause errors if we change something on the shared connection.

Channel error handling an reestablishing those could be worth it.
Maybe even only use one instead of two channels. (Publish and Subscribe use one each)
But the combining of those channels should be discussed and well researched.

Throwing another library in that I have been recommended to use in a scenario like this:
https://www.npmjs.com/package/amqp-connection-manager
For sure needs evaluation which one to use.

@ghost ghost changed the title Properly handle connection/channel errors Properly handle channel errors May 12, 2020
@ghost
Copy link
Author

ghost commented May 12, 2020

@chdanielmueller Good call, forgot the connection was passed in. This would only be for channel errors. Title and description updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant