I am relying on CloudAMQP service and I need to be able to support messages of size up to 10 Megabytes:
1. Map<String, Object> params = new HashMap<>();
2. params.put("x-ha-policy", "all");
3. params.put("x-max-length-bytes", 10_000_000);
4. channel.queueDeclare(messageQueueName, true, false, false, params);
My problem is that whenever the line 3 is not commented out, the queue throws an exception:
Caused by: com.rabbitmq.client.ShutdownSignalException:
channel error; reason: {#method<channel.close>(reply-code=406,
reply-text=PRECONDITION_FAILED -
inequivalent arg 'x-max-length-bytes' for queue 'someQueueName'
in vhost 'yzscezrk': received none but current is the value '1000000'
of type 'signedint
What am I doing wrong here?