Skip to content

feat: support opt-in broker auto-ack consumers - #2

Closed
hertzcodes wants to merge 1 commit into
mainfrom
feat/auto-ack
Closed

hertzcodes wants to merge 1 commit into
mainfrom
feat/auto-ack

Conversation

@hertzcodes

Copy link
Copy Markdown
Collaborator

Adds WithAutoAck(true) to Go consumers; the default stays off. The requested mode is sent on every stream handshake and requires the broker's subscription-auto-ack: true confirmation, so unsupported brokers fail explicitly. Policy rejections retain their PermissionDenied status.

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 ./... and cd 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.

@hertzcodes hertzcodes closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant