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.