Browse Source

Add function WithConsumeOptionsConsumerAutoAck to change the auto acknowledge property, when creating a consumer

pull/25/head
Victor Castillo 5 years ago
parent
commit
0d0b74c7e9
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      consume_options.go

+ 9
- 0
consume_options.go View File

@ -189,6 +189,15 @@ func WithConsumeOptionsConsumerName(consumerName string) func(*ConsumeOptions) {
} }
} }
// WithConsumeOptionsConsumerAutoAck returns a function that sets the auto acknowledge property on the server of this consumer
// if unset the default will be used (false)
func WithConsumeOptionsConsumerAutoAck(autoAck bool) func(*ConsumeOptions) {
return func(options *ConsumeOptions) {
options.ConsumerAutoAck = autoAck
}
}
// WithConsumeOptionsConsumerExclusive sets the consumer to exclusive, which means // WithConsumeOptionsConsumerExclusive sets the consumer to exclusive, which means
// the server will ensure that this is the sole consumer // the server will ensure that this is the sole consumer
// from this queue. When exclusive is false, the server will fairly distribute // from this queue. When exclusive is false, the server will fairly distribute


Loading…
Cancel
Save