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

[ADDED] Drain for jetstream consume methods #1515

Merged
merged 2 commits into from Jan 10, 2024
Merged

[ADDED] Drain for jetstream consume methods #1515

merged 2 commits into from Jan 10, 2024

Conversation

piotrpio
Copy link
Collaborator

This adds a drain functionality to both Consume() and Messages() in JetStream API (for standard and ordered consumers). Drain will cancel the existing pull requests on the server but continue processing messages available in the buffer on the client.

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

Few comments

jetstream/pull.go Show resolved Hide resolved
jetstream/pull.go Show resolved Hide resolved
jetstream/pull.go Show resolved Hide resolved
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio merged commit 44fac59 into main Jan 10, 2024
2 checks passed
@piotrpio piotrpio deleted the jetstream-drain branch January 10, 2024 22:46
piotrpio added a commit that referenced this pull request Jan 11, 2024
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio mentioned this pull request Jan 12, 2024
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

2 participants