我依赖 CloudAMQP 服务,我需要能够支持最大 10 兆字节的消息:
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);
我的问题是,只要第 3 行没有被注释掉,队列就会抛出异常:
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
我在这里做错了什么?