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

[FIX] when specifying a bind, if the consumer didn't specify deliver_to get flagged as pull #269

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

aricart
Copy link
Member

@aricart aricart commented Mar 4, 2022

No description provided.

…to, it was trapped as being a pull consumer, when the expected is that it will be what the bind returns.
@aricart aricart requested a review from kozlovic March 4, 2022 01:26
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@Jarema Jarema left a 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.

@@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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
@aricart aricart temporarily deployed to CI March 4, 2022 15:20 Inactive
@aricart aricart requested a review from Jarema March 4, 2022 15:21
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aricart aricart merged commit e99ff62 into main Mar 4, 2022
@aricart aricart deleted the fix-bind-fail branch March 4, 2022 15:27
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 this pull request may close these issues.

None yet

3 participants