-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set queue x-max-length parameter #130
Comments
Replying for anyone encountering this issue. I had the opposite error in Python: The problem was that the queue already existed and had been set up without the option set so defaulted to having no maximum queue length.
For anyone encountering this, you should go with solution (2) - solution (1) is only for fixing it so you can use solution (2). |
@agrski is there any way to update a queue configs such as So far I've only been able to resolve by deleting the queue which isn't desirable |
from your working directory, try:
|
Hello,
I'm trying to setup the x-max-length parameter in my queues:
rabbitmqctl set_policy Ten "^one-meg$" '{"x-max-length": 10}' --apply-to queues
But when trying to use rabbit.js I'm getting the following error:
Error: Channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'x-max-length' for queue 'WORKER' in vhost '/': received none but current is the value '10' of type 'signedint'"
In python (pika) I can set this parameter the following way:
credentials = pika.PlainCredentials('user', 'pw')
parameters = pika.ConnectionParameters(host='127.0.0.1',
port=5672,
virtual_host='/',
credentials = credentials,
heartbeat_interval = 60)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
args = { "x-max-length": 10 }
channel.queue_declare(queue="WORKER", durable=True, arguments=args)
May you clarify me how this could be accomplished using rabbit.js?
Thank you very much for your help.
Best regards,
Rogerio
The text was updated successfully, but these errors were encountered: