Skip to content

Commit

Permalink
Merge pull request #124 from quexer/main
Browse files Browse the repository at this point in the history
feat: add ServerDurableQueue,  providing durable queue option for micro.RegisterSubscriber
  • Loading branch information
jochumdev authored Nov 24, 2023
2 parents 54179a1 + 44f89a7 commit 6c2dd05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions v4/broker/rabbitmq/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"go-micro.dev/v4/broker"
"go-micro.dev/v4/server"
"go-micro.dev/v4/client"
"go-micro.dev/v4/server"
)

type durableQueueKey struct{}
Expand Down Expand Up @@ -34,6 +35,11 @@ type appID struct{}
type externalAuth struct{}
type durableExchange struct{}

// ServerDurableQueue provide durable queue option for micro.RegisterSubscriber
func ServerDurableQueue() server.SubscriberOption {
return setServerSubscriberOption(durableQueueKey{}, true)
}

// ServerAckOnSuccess export AckOnSuccess server.SubscriberOption
func ServerAckOnSuccess() server.SubscriberOption {
return setServerSubscriberOption(ackSuccessKey{}, true)
Expand Down

0 comments on commit 6c2dd05

Please sign in to comment.