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

NATS subject wrapping messing wildcards up #948

Closed
acostaf opened this issue Aug 6, 2018 · 2 comments
Closed

NATS subject wrapping messing wildcards up #948

acostaf opened this issue Aug 6, 2018 · 2 comments

Comments

@acostaf
Copy link

acostaf commented Aug 6, 2018

NATS support wildcards to filter messages coming in but the way the nest.js wraps the subject withing quotes break the functionally
E.g. this.client.send(foo.bar.baz... gets transform into '"foo.bar.baz"_ack' so

Wildcard Subscriptions

// "" matches any token, at any level of the subject.
nats.subscribe('foo.
.baz', function(msg, reply, subject) {
console.log('Msg received on [' + subject + '] : ' + msg);
});

nats.subscribe('foo.bar.*', function(msg, reply, subject) {
console.log('Msg received on [' + subject + '] : ' + msg);
});

// ">" matches any length of the tail of a subject, and can only be
// the last token E.g. 'foo.>' will match 'foo.bar', 'foo.bar.baz',
// 'foo.foo.bar.bax.22'
nats.subscribe('foo.>', function(msg, reply, subject) {
console.log('Msg received on [' + subject + '] : ' + msg);
});

@kamilmysliwiec
Copy link
Member

Fixed in 5.2.0. I'll publish it soon

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants