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

js: Add ChanQueueSubscribe for JS #744

Merged
merged 1 commit into from Jun 9, 2021
Merged

js: Add ChanQueueSubscribe for JS #744

merged 1 commit into from Jun 9, 2021

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Jun 9, 2021

Adds ChanQueueSubscribe to the JetStream context to consume from a stream using a channel.

mch := make(chan *nats.Msg, 16536)
sub, err = js.ChanQueueSubscribe("bar", "v1", mch, nats.Durable("qsub-chan"))
if err != nil {
	log.Fatal(err)
}

Fixes #743

Signed-off-by: Waldemar Quevedo wally@synadia.com

@coveralls
Copy link

coveralls commented Jun 9, 2021

Coverage Status

Coverage increased (+0.006%) to 86.925% when pulling 98dc666 on js-queue-chan into ba098b9 on master.

@wallyqs wallyqs requested review from derekcollison and kozlovic and removed request for derekcollison June 9, 2021 16:06
js.go Outdated Show resolved Hide resolved
test/js_test.go Outdated Show resolved Hide resolved
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

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM

@wallyqs wallyqs merged commit e4b051a into master Jun 9, 2021
@wallyqs wallyqs deleted the js-queue-chan branch June 9, 2021 17:21
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.

ChanQueueSubscribe for JetStream is missing?
4 participants