Repository navigation
feat: support opt-in broker auto-ack consumers - #2
Closed
hertzcodes wants to merge 1 commit into
Closed
hertzcodes wants to merge 1 commit into
hertzcodes wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
WithAutoAck(true)to Go consumers; the default stays off. The requested mode is sent on every stream handshake and requires the broker'ssubscription-auto-ack: trueconfirmation, so unsupported brokers fail explicitly. Policy rejections retain theirPermissionDeniedstatus.Auto-ack consumers invoke handlers without sending ACK or NACK frames, including for errors and recovered panics. Manual mode keeps handler-driven ACK/NACK behavior. Stream shutdown now waits for active handler workers before closing the ACK channel, avoiding sends to a closed channel.
Updates usage documentation and pins the published protocol PR commit (no local replacements).
Validation:
cd go && go test ./...andcd go && go test -race ./...pass. Tests cover default-off, serial/concurrent handlers, success/error/panic outcomes, legacy and rejecting brokers, and reconnect negotiation.Depends on futureq-io/protocol#1. Part of futureq-io/futureq#77; server implementation is in a separate PR.