-
Notifications
You must be signed in to change notification settings - Fork 689
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
Add MaxRequestMaxBytes consumer option #1043
Conversation
test/js_test.go
Outdated
t.Fatal(err) | ||
} | ||
defer sub.Unsubscribe() | ||
if _, err := sub.Fetch(10); err == nil || !strings.Contains(err.Error(), "MaxRequestMaxBytes of 100") { |
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.
Looks like there is no message at this point and so this fails with a timeout and not what you expect. I know that this test can be tricky because those t.Run() may influence the other ones, but you could try to send at least 1 message that is big enough before creating the pull subscribe to see if you get the expected error.
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.
Thanks. I realized this was only partially implemented because the fetch request wasn't including the MaxBytes
option. I added a pull option which can be used to set this in the fetch request. This is now rejected regardless if a message is available.
Signed-off-by: Byron Ruth <b@devel.io>
Signed-off-by: Byron Ruth <b@devel.io>
f0f7b36
to
2de06e0
Compare
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.