-
Notifications
You must be signed in to change notification settings - Fork 141
Description
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