techjourneyman
techjourneyman

Reputation: 1813

Sending messages to durable queue using Rabbit perf test tool

How can I send messages to a durable queue using the Rabbit Perf Test tool? I am getting this following error:

Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'myservice_q' in vhost 'myvhost': received 'false' but current is 'true', class-id=50, method-id=10)

A command I tried is:

bin/runjava com.rabbitmq.perf.PerfTest -h amqps://myrabbit.instance.com:5671/myvhost -u myservice_q -ad false -pmessages 10 -y0 -f mandatory -f persistent

I used the -f flag with both values persistent and mandatory and it did not work. I tried other flags offered by the tool and none worked. Can someone tell me how this can be done?

Upvotes: 0

Views: 710

Answers (2)

Kritarth Sharma
Kritarth Sharma

Reputation: 432

I used --predeclared flag and it worked

java -jar "C:\Users\krita\Downloads\perf-test-2.19.0.jar" --uri amqp://guest:guest@localhost:5672 --predeclared --consumers 0 --body F:\Coding\Devslane\Pulselabs\api\test.json  --body-content-type application/json "aggregation.surveys" --id "test 1"

Upvotes: 0

techjourneyman
techjourneyman

Reputation: 1813

I was able to do it by using both the flags -f mandatory -f persistent. It worked.

Upvotes: 0

Related Questions