STOMP: sending a message to a parametrized queue causes errors in log

643 views
Skip to first unread message

mic...@mikejustin.com

unread,
Dec 31, 2016, 4:38:55 AM12/31/16
to rabbitmq-users
Hello,

I am testing access to parametrized queues with args such as auto-delete, durable and exclusive on RabbitMQ 3.6.5.

The first Stomp connection creates the queue, and remains connected:

SUBSCRIBE
destination:/queue/QueueTest
ack:auto
id:queueid
auto-delete:true

The second Stomp connection tries to send a message to the test queue:

SEND
destination:/queue/QueueTest
content-type:text/plain


The log file contains this error report:

=ERROR REPORT==== 31-Dec-2016::09:30:45 ===
Channel error on connection <0.3811.1> (127.0.0.1:50002 -> 127.0.0.1:61613, vhost: '/', user: 'client2'), channel 1:
operation queue.declare caused a channel exception precondition_failed: "inequivalent arg 'auto_delete' for queue 'QueueTest' in vhost '/': received 'false' but current is 'true'"

=ERROR REPORT==== 31-Dec-2016::09:30:45 ===
STOMP error frame sent:
Message: precondition_failed
Detail: "PRECONDITION_FAILED - inequivalent arg 'auto_delete' for queue 'QueueTest' in vhost '/': received 'false' but current is 'true'\n"
Server private detail: none

The same errors appear with the durable and exclusive arguments.

Is there a way to avoid this error when sending messages to a queue which has modified args?

Michael Klishin

unread,
Dec 31, 2016, 4:53:14 AM12/31/16
to rabbitm...@googlegroups.com
All arguments must match those provided when the queue was first used via STOMP or declared using AMQP 0-9-1. You can delete the queue and use the parameters you have. It will be re-created.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mic...@mikejustin.com

unread,
Dec 31, 2016, 5:12:43 AM12/31/16
to rabbitmq-users
The queue does not exist when the Stomp client subscribes, it is created and shown in the web interface with the correct arguments. After the test finished, I delete the queue in the web interface.

Does the SEND frame require the same arguments?

Michael Klishin

unread,
Dec 31, 2016, 5:28:05 AM12/31/16
to rabbitm...@googlegroups.com
It does. It will ensure the queue exists.

mic...@mikejustin.com

unread,
Dec 31, 2016, 5:57:30 AM12/31/16
to rabbitmq-users
Ok I just tested it successfully with the "auto-delete" argument.

I also tested the the "durable" argument.

The queue initially does not exist, and the first connection created it and is still subscribed, this time with durable=false set.

SUBSCRIBE
destination:/queue/QueueTestDurableFalse
ack:client
id:myid
durable:false


durable=false is set in the SEND frame:

SEND
destination:/queue/QueueTestDurableFalse
persistent:false
content-type:text/plain


The send fails with this error:

=ERROR REPORT==== 31-Dec-2016::11:52:27 ===
Channel error on connection <0.884.0> (127.0.0.1:49333 -> 127.0.0.1:61613, vhost: '/', user: 'client2'), channel 1:
operation queue.declare caused a channel exception resource_locked: "cannot obtain exclusive access to locked queue 'QueueTestDurableFalse' in vhost '/'"

=ERROR REPORT==== 31-Dec-2016::11:52:27 ===
STOMP error frame sent:
Message: resource_locked
Detail: "RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'QueueTestDurableFalse' in vhost '/'\n"
Server private detail: none

I am not sure why the queue is locked. I have created a new queue name for this test, restarted the server and verified that the queue does not exist.

mic...@mikejustin.com

unread,
Dec 31, 2016, 6:05:36 AM12/31/16
to rabbitmq-users
p.s. I tried persistent=false and durable=false in the send frame (the error message in the log is the same)
Reply all
Reply to author
Forward
0 new messages