-
Notifications
You must be signed in to change notification settings - Fork 40
[ADD] DeliverBodies to disable headersOnly #546
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
Conversation
consumers.go
Outdated
@@ -368,6 +368,14 @@ func DeliverHeadersOnly() ConsumerOption { | |||
} | |||
} | |||
|
|||
// DeliverHeadersOnlyEx configures the consumer to deliver headers only. If headersOnly is false, the consumer will deliver the full message. | |||
func DeliverHeadersOnlyEx(headersOnly bool) ConsumerOption { |
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.
Why the Ex in the name?
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.
Sorry I see now. This results in 2 ways to achieve the same.
So I think I would rather have a function something like DeliverBodies() or similar function rather than end up with 2 ways to set true
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.
Sorry, updated. I gave you the context in our Slack instead of here.
eec1fda
to
e7b9d86
Compare
Seems you wanted to push a commit that moves to DeliverBodies() but github pr diff still shows the old names If not already done in the new code please update the comment on HeadersOnly indicating that the new function inverts it |
e7b9d86
to
bd1d572
Compare
Thank you. I edited the commit message and did not push the changes. |
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
Thank you! |
Add DeliverBodies, which allows a consumer to be updated with headersOnly: false
This change will also be helpful for Nack: https://github.com/nats-io/nack/blob/main/controllers/jetstream/consumer.go#L408-L410