activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yury Batrakov <batra...@gmail.com>
Subject Stomp and content-length
Date Wed, 08 Apr 2009 22:10:26 GMT

Hi all!

I'd like to ask for advice about one problem in Stomp protocol that I'd
faced. Looks like Stomp protocol have some agreement that messages without
'content-length' header are considered to be text messages and ones with
content-length is set are binary. The same logic is implemented in
transport/stomp/JmsFrameTranslator.java:
if(headers.containsKey(Stomp.Headers.CONTENT_LENGTH) ... )
{
    // treat this message as binary
}
else
{
   // unmarshall xml/json text and form ObjectMessage
}

This seems reasonable, but Ruby Stomp library, I've got from gems always
sets 'content-length', so JSON text, I send from Ruby code don't want to
turn to Java's ObjectMessages.

Well, the question is: is this ActiveMQ's behaviour expected and I should
bug Ruby Stomp library's developers about fixinf their code; or there is a
point of implementing one more condition checking if message's
'content-type' is 'text/plain'?

Thank you in advance.
-- 
View this message in context: http://www.nabble.com/Stomp-and-content-length-tp22960715p22960715.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message