Getting "invalid property 'auto-delete'" when testing Quorum Queues with PerfTest in RabbitMQ
search cancel

Getting "invalid property 'auto-delete'" when testing Quorum Queues with PerfTest in RabbitMQ

book

Article ID: 297342

calendar_today

Updated On:

Products

Support Only for OpenSource RabbitMQ

Issue/Introduction

When using PerfTest with quorum queues:

bin/runjava com.rabbitmq.perf.PerfTest  --queue-args x-queue-type=quorum -x 1 -y 2 -u "throughput-test-1" -a --id "test 1" --auto-delete false 


You see an error message that contains the following (full error at the end of the section): 

invalid property 'auto-delete' for queue ...


If you use the flags --auto-delete false (or -ad false), you may see a message containing the following (full error at the end of the section):

invalid property 'non-durable' for queue...


Below is the full error message for "invalid property 'auto-delete'":

$ bin/runjava com.rabbitmq.perf.PerfTest  --queue-args x-queue-type=quorum -x 1 -y 2 -u "throughput-test-1" -a --id "test 1"
/Users/berti/Work/Cases/273601_-_RabbitMQ_Benchmark_with_PerfTest/rabbitmq-perf-test-2.14.0
id: test 1, starting consumer #0
id: test 1, starting consumer #0, channel #0
Main thread caught exception: java.io.IOException
17:32:02.866 [main] ERROR com.rabbitmq.perf.PerfTest - Main thread caught exception
java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:968)
	at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.queueDeclare(AutorecoveringChannel.java:342)
	at com.rabbitmq.perf.MulticastParams$TopologyHandlerSupport.configureQueues(MulticastParams.java:798)
	at com.rabbitmq.perf.MulticastParams$TopologyHandlerSupport.configureQueues(MulticastParams.java:746)
	at com.rabbitmq.perf.MulticastParams$FixedQueuesTopologyHandler.configureQueuesForClient(MulticastParams.java:870)
	at com.rabbitmq.perf.MulticastParams.createConsumer(MulticastParams.java:501)
	at com.rabbitmq.perf.MulticastSet.createConsumers(MulticastSet.java:330)
	at com.rabbitmq.perf.MulticastSet.run(MulticastSet.java:173)
	at com.rabbitmq.perf.PerfTest.main(PerfTest.java:353)
	at com.rabbitmq.perf.PerfTest.main(PerfTest.java:473)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid property 'auto-delete' for queue 'throughput-test-1' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 10 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid property 'auto-delete' for queue 'throughput-test-2' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	at java.base/java.lang.Thread.run(Thread.java:834)


Below is the full error message for "invalid property 'non-durable'":

bin/runjava com.rabbitmq.perf.PerfTest  --queue-args x-queue-type=quorum -x 1 -y 2 -u "throughput-test-1" -a --id "test 1" --auto-delete false
/Users/berti/Work/Cases/273601_-_RabbitMQ_Benchmark_with_PerfTest/rabbitmq-perf-test-2.14.0
id: test 1, starting consumer #0
id: test 1, starting consumer #0, channel #0
Main thread caught exception: java.io.IOException
17:26:14.499 [main] ERROR com.rabbitmq.perf.PerfTest - Main thread caught exception
java.io.IOException: null
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
	at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:968)
	at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.queueDeclare(AutorecoveringChannel.java:342)
	at com.rabbitmq.perf.MulticastParams$TopologyHandlerSupport.configureQueues(MulticastParams.java:798)
	at com.rabbitmq.perf.MulticastParams$TopologyHandlerSupport.configureQueues(MulticastParams.java:746)
	at com.rabbitmq.perf.MulticastParams$FixedQueuesTopologyHandler.configureQueuesForClient(MulticastParams.java:870)
	at com.rabbitmq.perf.MulticastParams.createConsumer(MulticastParams.java:501)
	at com.rabbitmq.perf.MulticastSet.createConsumers(MulticastSet.java:330)
	at com.rabbitmq.perf.MulticastSet.run(MulticastSet.java:173)
	at com.rabbitmq.perf.PerfTest.main(PerfTest.java:353)
	at com.rabbitmq.perf.PerfTest.main(PerfTest.java:473)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid property 'non-durable' for queue 'throughput-test-1' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
	... 10 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid property 'non-durable' for queue 'throughput-test-1' in vhost '/', class-id=50, method-id=10)
	at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:517)
	at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:341)
	at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:182)
	at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:114)
	at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739)
	at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666)
	at java.base/java.lang.Thread.run(Thread.java:834)


Environment

Product Version: 3.8

Resolution

PerfTest needs the flags --auto-delete false (or -ad false) and --flag persistent (or -f persistent) to run successfully when working with quorum queues.
bin/runjava com.rabbitmq.perf.PerfTest  --queue-args x-queue-type=quorum -x 1 -y 2 -u "throughput-test-1" -a --id "test 1" --auto-delete false --flag persistent


Flags description

  • auto-delete: A queue that has had at least one consumer is deleted when the last consumer unsubscribes.
  • -f persistent: Refers to queue durability. This will make the queue durable.
Quorum queues must be durable and can't be auto-delete due to the assumptions and requirements of the underlying replication protocol.