From ab0add5ecec0295394effb6db91cd2ea541d645a Mon Sep 17 00:00:00 2001 From: quexer Date: Sun, 22 Oct 2023 10:00:36 +0800 Subject: [PATCH] feat: export AckOnSuccess server.SubscriberOption --- v4/broker/rabbitmq/options.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v4/broker/rabbitmq/options.go b/v4/broker/rabbitmq/options.go index 4a31846e..1a286077 100644 --- a/v4/broker/rabbitmq/options.go +++ b/v4/broker/rabbitmq/options.go @@ -5,6 +5,7 @@ import ( "time" "go-micro.dev/v4/broker" + "go-micro.dev/v4/server" ) type durableQueueKey struct{} @@ -32,6 +33,11 @@ type appID struct{} type externalAuth struct{} type durableExchange struct{} +// ServerAckOnSuccess export AckOnSuccess server.SubscriberOption +func ServerAckOnSuccess() server.SubscriberOption { + return setServerSubscriberOption(ackSuccessKey{}, true) +} + // DurableQueue creates a durable queue when subscribing. func DurableQueue() broker.SubscribeOption { return setSubscribeOption(durableQueueKey{}, true)