From 6f3ed3ed7cb5c6b7d52775f30855deba47e0e93e Mon Sep 17 00:00:00 2001 From: Ali Najafizadeh Date: Sun, 18 Aug 2024 08:48:50 -0400 Subject: [PATCH] Add Expires time to Confirm events --- bus.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bus.go b/bus.go index 85d466b..0d1263d 100644 --- a/bus.go +++ b/bus.go @@ -235,7 +235,11 @@ func (m *Msg) Ack(ctx context.Context) error { } for replySubject := range m.replyConfirms { - confirmEvent, err := NewEvent(WithSubject(replySubject), WithData(confirmMsg)) + confirmEvent, err := NewEvent( + WithSubject(replySubject), + WithData(confirmMsg), + WithExpiresAt(30*time.Second), + ) if err != nil { return err }