Problem
The Ack() and Nak() methods in our message queue implementation currently lack context.Context. This means they cannot respect request timeouts or graceful shutdown signals, potentially leading to "hanging" operations if the connection to NATS is interrupted.
Proposed Solution
Refactor the mq interface to include ctx context.Context in all acknowledgment methods. This ensures that every interaction with the message broker is bound by the application's lifecycle and timeout policies.
Taite can take this
Alternatives Considered
None
Additional Context
None
Problem
The Ack() and Nak() methods in our message queue implementation currently lack context.Context. This means they cannot respect request timeouts or graceful shutdown signals, potentially leading to "hanging" operations if the connection to NATS is interrupted.
Proposed Solution
Refactor the mq interface to include ctx context.Context in all acknowledgment methods. This ensures that every interaction with the message broker is bound by the application's lifecycle and timeout policies.
Taite can take this
Alternatives Considered
None
Additional Context
None