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

Emit channel events #42

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Emit channel events #42

merged 1 commit into from
Jan 18, 2023

Conversation

tbence94
Copy link
Contributor

@tbence94 tbence94 commented Jan 18, 2023

Summary

  • Emit channel events to avoid uncaught exceptions

Why do we need this?

This lib was built on the logic that each connection has a single channel. If that channel closes the connection becomes unusable and should either close or recreate the channel. If you call .checkQueue or assertQueue on the channel when the queue does not exist the channel will close. So other queues that were perfectly fine till this point will stop working.

By emitting close and error events developers can create custom error handling or reconnect logic to handle this issue.
Otherwise the exceptions thrown by check and assert calls would be uncaught because no one listens to them.

@tbence94 tbence94 self-assigned this Jan 18, 2023
@tbence94 tbence94 merged commit 1d0acb1 into master Jan 18, 2023
@tbence94 tbence94 deleted the feature/channel-events branch January 18, 2023 15:36
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

Successfully merging this pull request may close these issues.

None yet

1 participant