-
Notifications
You must be signed in to change notification settings - Fork 698
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
Panic when creating jet stream consumer on wildcard stream #1641
Comments
Hello @areknoster, thanks for reporting the issue and thank you for creating the test - it looks like we're getting an unexpected response type from the server for create consumer request. I'll take a look and let you know when I have a fix. |
The client should not allow a wildcard stream with publish ack set it will break everything. |
The issue here is that if you create a stream with I'll be adding a validation in the client to disallow creating such streams. |
Thank you for the responses! I have additional thoughts on the issue:
|
@piotrpio I do not want us to disallow broader scoped subjects for streams but as you mention we should suppress pub acks if the subject is sufficiently wide. The server needs to support this of course and enforce the no pub ack config on those wider stream subjects. |
@areknoster You are correct for certain subjects we should have the server perform the check. |
@derekcollison Agreed, it would be good for the server to perform the validation. @areknoster I agree that the client should not panic. We'll have to add a check for nil response in each JS API call. I will create an issue for that and if you wish to contribute that would be great! |
@areknoster I've created the issue: #1642 If you wish to contribute, please assign yourself to it - thanks :) |
Observed behavior
When creating consumer against embedded NATS server JetStream with wildcard (
>
) subscription, the function panics.Expected behavior
The function doesn't panic and returns consumer that's usable.
Server and client version
Host environment
Steps to reproduce
Run this test: #1640
The text was updated successfully, but these errors were encountered: