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

Reworked PullSubscribe implementation #791

Merged
merged 1 commit into from Aug 10, 2021
Merged

Reworked PullSubscribe implementation #791

merged 1 commit into from Aug 10, 2021

Conversation

kozlovic
Copy link
Member

Use a SyncSubscription instead. The only visible change from the
user is that calling Fetch() after Unsubscribe() returns ErrBadSubscription
instead of timeout or context deadline exceeded, which makes more
sense to me. This is the only test that I had to tweak.

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Use a SyncSubscription instead. The only visible change from the
user is that calling Fetch() after Unsubscribe() returns ErrBadSubscription
instead of timeout or context deadline exceeded, which makes more
sense to me. This is the only test that I had to tweak.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@@ -1433,7 +1337,7 @@ func (sub *Subscription) resetOrderedConsumer(sseq uint64) {
osid := sub.applyNewSID()

// Grab new inbox.
newDeliver := NewInbox()
newDeliver := nc.newInbox()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derekcollison Unrelated to this PR, but while I was changing references to NewInbox() in subscribe, I found this one and changed it too. If it should not be changed, let me know.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit d1955c8 into master Aug 10, 2021
@kozlovic kozlovic deleted the rework_pull_sub branch August 10, 2021 01:01
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

3 participants