Browse Source

Merge pull request #98 from aaqaishtyaq/queue-quorum

add quorum queue option for the consumer
pull/111/head
Lane Wagner 3 years ago
committed by GitHub
parent
commit
32bd696a7a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      consumer_options.go

+ 11
- 0
consumer_options.go View File

@ -282,3 +282,14 @@ func WithConsumerOptionsQOSPrefetch(prefetchCount int) func(*ConsumerOptions) {
func WithConsumerOptionsQOSGlobal(options *ConsumerOptions) {
options.QOSGlobal = true
}
// WithConsumerOptionsQueueQuorum sets the queue a quorum type, which means
// multiple nodes in the cluster will have the messages distributed amongst them
// for higher reliability
func WithConsumerOptionsQueueQuorum(options *ConsumerOptions) {
if options.QueueOptions.Args == nil {
options.QueueOptions.Args = Table{}
}
options.QueueOptions.Args["x-queue-type"] = "quorum"
}

Loading…
Cancel
Save