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

ADR-37 pull termination clarification #234

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion adr/ADR-37.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ Not Telegraphed:
- 408 Request Timeout
- 409 Message Size Exceeds MaxBytes

Calls to `next()` and `fetch()` should be concluded when the pull is terminated. On the other hand `consume()` should recover
while maintaing its state (e.g. pending counts) by issuing a new pull request unless the status is `409 Consumer Deleted` or `409 Consumer is push based` in
which case `consume()` call should conclude in an implementation specific way idiomatic to the language being used.

###### Idle heartbeats

`Consume()` should always utilize idle heartbeats. Heartbeat values are calculated as follows:
Expand Down Expand Up @@ -339,7 +343,7 @@ was described in previous sections.
6. Verify error type:
- if message contains `Nats-Pending-Messages` and `Nats-Pending-Bytes` headers, go to #7
- verify if error should be terminal based on [Status handling](#status-handling),
then issue a warning/error (if required) and terminate if necessary.
then issue a warning/error (if required) and conclude the call if necessary.
7. Read the values of `Nats-Pending-Messages` and `Nats-Pending-Bytes` headers.
8. Subtract the values from pending messages count and pending bytes count respectively.
9. Go to #1.
Expand Down
Loading