Skip to content

Commit

Permalink
AMQP-1. consumer: only set consumer priority when > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Jan 16, 2025
1 parent 61dd7ee commit 3b5f05d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/amqp10/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ func (c *Amqp10Consumer) Stop(reason string) {
}

func buildLinkProperties(cfg config.Config) map[string]any {
props := map[string]any{
"rabbitmq:priority": cfg.ConsumerPriority,
props := map[string]any{}

if cfg.ConsumerPriority != 0 {
props["rabbitmq:priority"] = cfg.ConsumerPriority
}

return props
Expand Down

0 comments on commit 3b5f05d

Please sign in to comment.