Stomp frame header 'persistent:1' in non-persistent message

26 views
Skip to first unread message

in...@habarisoft.com

unread,
Oct 29, 2021, 6:39:47 AM10/29/21
to rabbitmq-users
Hi,

I think it there is a noteworthy unexpected value of the 'persistent' header of the MESSAGE frame sent from RabbitMQ to Stomp clients. This occurs when I publish a 'non-persistent' message to a 'classic' queue from the web interface. 

The queue has been created using the web interface, with durabilitiy set to "transient".
My Stomp client subscribes to the destination as follows:

SUBSCRIBE
destination:/queue/nondurable
ack:auto
id:{7F8FBD85-8A6D-41EF-936D-38D9D1A1C4B9}
durable:false
exclusive:false
auto-delete:false

Now I publish a 'non-persistent' message to the queue from the web interface. 

A MESSAGE frame is received in a Stomp client with 'persistent' header value '1', I would expect a 'false' here.

MESSAGE
subscription:{7F8FBD85-8A6D-41EF-936D-38D9D1A1C4B9}
destination:/queue/nondurable
message-id:T_{7F8FBD85-8A6D-41EF-936D-38D9D1A1C4B9}@@session-I6kB3IwcYD-ac7LL6nEPHg@@1
redelivered:false
persistent:1
content-length:4

Test

Should I create a issue in the Github bug tracker? 


Michal Kuratczyk

unread,
Nov 2, 2021, 6:14:18 PM11/2/21
to rabbitm...@googlegroups.com
Hi,

I can reproduce your results but I can also see a difference based on the persistence of the message I publish.
When I publish a persistent message, I see "persistent: true" but when I publish a non-persistent message,
I get "persistent: 1". My guess is that this is a leaky translation of AMQP to STOMP - in AMQP delivery-mode
of 1 means non-persistent and delivery-mode=2 means persistent. Seems like the latter is translated to "true"
but the former is left as-is. Looking at the STOMP spec (https://stomp.github.io/stomp-specification-1.2.html)
I don't see any specification of what this value should be - just that the headers can be used to provide such information.
Assuming all of the above is correct, is it ok for you? Can you just treat 1 as false?

Disclaimer: I know close to nothing about STOMP so please bear with me. :)

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/e709cb9c-24fb-4826-886a-6bc89cc00904n%40googlegroups.com.


--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages