-
Notifications
You must be signed in to change notification settings - Fork 106
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
Do not block while waiting for previous message to be confirmed #84
Do not block while waiting for previous message to be confirmed #84
Conversation
Before ChannelWrapper would always wait for a message to be confirmed before publishing the next message. This commit changes the behaviour so messages are published to the lower level channel as fast as they are received by the ChannelWrapper.
3 similar comments
return sendPromise; | ||
}) | ||
.then( | ||
result => { | ||
this._messages.shift(); | ||
this._unconfirmedMessages.shift(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes messages will be confirmed in the same order they were added to _unconfirmedMessages, but that sounds reasonable.
This should fix #65, too. |
Oops - didn't realize your commit message didn't conform to angular commit style - no build was kicked off for this. |
🎉 This PR is included in version 2.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Before ChannelWrapper would always wait for a message to be confirmed before publishing the next message. This commit changes the behaviour so messages are published to the lower level channel as fast as they are received by the ChannelWrapper.
This means that for code like this, all messages will by published at once, instead of waiting for each message to be confirmed before publishing the next: