Skip to content

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

Open
AmHonored wants to merge 2 commits into
futureq-io:mainfrom
AmHonored:feat/auto-ack
Open

AmHonored wants to merge 2 commits into
futureq-io:mainfrom
AmHonored:feat/auto-ack

Conversation

@AmHonored

@AmHonored AmHonored commented Nov 7, 2026 •

Copy link
Copy Markdown

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 waits for active handler workers before closing the ACK channel, avoiding sends to a closed channel.

Updates usage documentation and fixes the existing CI workflow to run from the go/ module and cache its dependencies.

Validation: cd go && go test ./..., go test -race ./..., and go vet ./... pass. Tests cover default-off, serial/concurrent handlers, success/error/panic outcomes, legacy and rejecting brokers, and reconnect negotiation.

Depends on futureq-io/protocol#2. Until that change is merged and released, go.mod explicitly replaces the protocol module with the immutable commit in AmHonored/protocol. Switch to the upstream release and remove the replacement after the protocol PR lands.

Part of futureq-io/futureq#77. Server implementation: futureq-io/futureq#80.

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