-
Notifications
You must be signed in to change notification settings - Fork 53
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
[FIX] when specifying a bind, if the consumer didn't specify deliver_to get flagged as pull #269
Conversation
…to, it was trapped as being a pull consumer, when the expected is that it will be what the bind returns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing - this error is very confusing.
I suggest improving it a little.
nats-base-client/jsclient.ts
Outdated
@@ -330,7 +330,7 @@ export class JetStreamClientImpl extends BaseApiClient | |||
const cso = await this._processOptions(subject, opts); | |||
// this effectively requires deliver subject to be specified | |||
// as an option otherwise we have a pull consumer | |||
if (!cso.config.deliver_subject) { | |||
if (!cso.isBind && !cso.config.deliver_subject) { | |||
throw new Error( | |||
"consumer info specifies a pull consumer - deliver_subject is required", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"consumer info specifies a pull consumer - deliver_subject is required", | |
"deliver_subject is required for Push Consumer", |
…eliver_subject to `push consumer requires deliver_subject` [CHORE] removed debug test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
No description provided.