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
Pull config changes in ConsumerConfig and JSApiConsumerGetNextRequest #112
Comments
Note that we may not rush that to be added in client libraries until the JS simplification work is done and some discussion occurs between client and server team. |
I've marked my additions to pull requests as EXPERIMENTAL so we can change them without a break if we need to. |
There are other issues - if the stream has a message that is larger than the |
Which |
The new max_bytes on a pull (JSApiConsumerGetNextRequest) Let's say you set max_bytes to 1k, but have a message that is 2k. What will happen? |
You get this.. nats.Header{"Status": []string{"408"}, "Description": []string{"Message Size Exceeds MaxBytes"}} |
It would be nice if we didn't have to rely on text for status messages. We face the same issue with flow control and heartbeats, we have to recognize the status code (100) and the text. For this though, at a minimum I wonder if there is a better code than 408. Maybe one of these?
At a maximum, is there any way we can just ditch the http based codes here and use an api [like] error code? |
I think that is an excellent idea and happy to make that change. We also of course have a precedence of adding in specific error codes to compliment the status codes, which by design are mimicking HTTP. |
I don't think we can ditch status alignment with HTTP at this point. |
the one thing that is not great about the current strat, is that these errors are reported simply as status errors, there's no attribution, the only thing making them jetstream is that there's no payload. Since they are a JetStream response, it would be great if they were js API errors. - or headers indicated that these are jetstream errors. |
We could possible add more headers, but not sure if that would buy us much. Sometimes it feels like that just means you need to check multiple headers versus one. How are you thinking about that would work out in practice and for applications? |
Implemented in Go nats-io/nats.go#1043 |
Overview
Support for MaxBytes for pull requests including changes to Consumer Configuration and JSApiConsumerGetNextRequest
See Server PR 3126
The Consumer Configuration now includes
max_expires
andmax_bytes
The JSApiConsumerGetNextRequest now includes
max_bytes
andidle_heartbeat
The
max_bytes
limit makes the server complete a batch request if the total number of bytes sent to a pull request reaches this value. It works in combination withbatch
count, which means that the pull request will be complete based on whichever completes first (count or size).The
idle_hearbeat
causes the server to send messages with "100 Idle Heartbeat" status (note that the value cannot be 50% more than the consumer config heartbeat value, but the check is done by the server, library does not have to check for that).Note
max_bytes
is currently EXPERIMENTAL while behavior is ironed out.Clients and Tools
max_bytes
onPullOptions
nats.deno#318Other Tasks
Implemented
Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.
The text was updated successfully, but these errors were encountered: