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

Only one consumer allowed when using filter_subjects #4081

Closed
cjbottaro opened this issue Apr 20, 2023 · 4 comments
Closed

Only one consumer allowed when using filter_subjects #4081

cjbottaro opened this issue Apr 20, 2023 · 4 comments
Assignees

Comments

@cjbottaro
Copy link

cjbottaro commented Apr 20, 2023

[workqueue] retention type allows for a set of consumers that have non-overlapping interest on subjects. In other words, if multiple consumers are bound to a work-queue stream, they must have disjoint filter subjects.

stream_create("project-1", retention: "workqueue", subjects: ["project-1.*"])

consumer_create("project-1", "consumer-1", filter_subjects: ["project-1.subject-1"])
consumer_create("project-1", "consumer-2", filter_subjects: ["project-1.subject-2"])

Results in an error...

"multiple non-filtered consumers not allowed on workqueue stream"

Thanks for the help.

@ripienaar
Copy link
Contributor

Error suggests your filter_subjects isn’t being used at all.

Please show output of nafs consumer info for one of these.

@cjbottaro
Copy link
Author

I think a part of the problem is that I don't know how to make the request properly.

nats schema info io.nats.jetstream.api.v1.consumer_create_request doesn't show how to specify multiple subjects, so I'm just going off of #3500, which seems to add a filter_subjects option.

But you're right, if I create a consumer with that option, I don't see anything about it reflected in nats consumer info. Also, that option isn't available in the nats command line.

@ripienaar
Copy link
Contributor

Oh sorry I see what’s happening now.

This is a upcoming 2.10 feature. So you need nightly server and nightly nats command.

@cjbottaro
Copy link
Author

Oofa, sorry, I thought the current server version was 2.15, but it's actually 2.9.15. Ugh, sorry for the noise.

Anyway, looking forward to this feature. Thank you!

@bruth bruth removed the 🐞 bug label Aug 18, 2023
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

No branches or pull requests

4 participants