corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

Cannot connect to queue with priority #34

Closed salvatorecordiano closed 6 years ago

salvatorecordiano commented 6 years ago

I'm using your consumer in production environment with success.

Today I created a new queue with feature x-max-priority: 100, but when I try to start a new consumer I receive the following error:

2018/05/31 20:44:37 failed to register a consumer: Exception (504) Reason: "channel/connection is not open"

This is my consumer configuration:

[rabbitmq]
host=rabbit-0
username=project
password="password"
vhost=/project
port=5672
compression=Off
onfailure=6

[prefetch]
count=1
global=Off

[logs]
error=/var/www/project/shared/cli_logs/rabbitmq_error.log
info=/var/www/project/shared/cli_logs/rabbitmq_info.log

Can you help me? Thanks

corvus-ch commented 6 years ago

Hi @salvatorecordiano,

My first guess would be, that your config is missing the priority option in the [queuesettings] section. Can you please try setting that option to 100 — since that is the value you created the Quade with according to your post?

salvatorecordiano commented 6 years ago

@corvus-ch thanks! I added the following section to my consumer configuration 8 days ago and it is the same you suggested. It works.

[queuesettings]
priority = 100

When i opened this issue i was confusing the difference between queue/message priorities and consumer priorities.