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

subject wildcard ">" does not work #502

Closed
BryceCao opened this issue Jan 13, 2022 · 2 comments · Fixed by #503
Closed

subject wildcard ">" does not work #502

BryceCao opened this issue Jan 13, 2022 · 2 comments · Fixed by #503

Comments

@BryceCao
Copy link

BryceCao commented Jan 13, 2022

Firstly,we has a durable stream with a subject "test.user", "nats-js-sub -subj test.* -stream ... -print -s ..." can consume events normally,but "nats-js-sub -subj test.> -stream ... -print -s ..." cant consume any event. its likely because js_GetConsumerInfo() get filterSubject with "u003e" instead of ">" , cause “”subject ... does not match consumer filter subject ...".

@kozlovic
Copy link
Member

Thank you for the report. I will have a look as soon as possible.

kozlovic added a commit that referenced this issue Jan 15, 2022
The issue was actually caused by JSON parsing, so that could manifest
in other situations.
But for the reported issue, if a consumer was created with a filter
subject that contained the ">" wildcard and the user creates a
subscription with that same subject, the check for filter subject
match would fail because "test.>" is different than "test.\u003e".

Resolves #502

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic
Copy link
Member

@BryceCao I have a PR that addresses the issue specific to JSON decoding of unicodes, but, I want to make sure we are clear that if the stream captures only test.user, then creating a consumer with a filter subject on "test.>" is not failing, but the consumer will not receive messages sent on "test.bar".
Also the C client has not yet implemented the following check regarding subscription filter matching: nats-io/nats-architecture-and-design#67

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 a pull request may close this issue.

2 participants