From 3496edb405f160f0c75570b35f158216197ea252 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Date: Wed, 30 Oct 2024 20:03:07 +0100 Subject: [PATCH] fix: Use individual ACK policy for artemismq image Signed-off-by: Jorge Turrado --- e2e/images/artemis/cmd/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/images/artemis/cmd/main.go b/e2e/images/artemis/cmd/main.go index 7d98100..b5d5cb6 100644 --- a/e2e/images/artemis/cmd/main.go +++ b/e2e/images/artemis/cmd/main.go @@ -73,7 +73,7 @@ func consumeMessages() { panic(err) } defer conn.Disconnect() - sub, err := conn.Subscribe(destination, stomp.AckAuto, stomp.SubscribeOpt.Header("subscription-type", "ANYCAST")) + sub, err := conn.Subscribe(destination, stomp.AckClientIndividual, stomp.SubscribeOpt.Header("subscription-type", "ANYCAST")) if err != nil { panic(fmt.Errorf("could not subscribe to queue %s: %v", destination, err)) } @@ -87,6 +87,7 @@ func consumeMessages() { panic(fmt.Errorf("failed to decode message: %v: %v", msg.Header, err)) } log.Println(*m) + conn.Ack(msg) time.Sleep(time.Duration(sleep * int(time.Millisecond))) } }