The Send STOMP RFC example

260 views
Skip to first unread message

jgauffin

unread,
Nov 7, 2013, 7:54:33 AM11/7/13
to stomp...@googlegroups.com
In the RFC the following example exists:

SEND
destination:/queue/a
receipt:message-12345

hello queue a^@
Ins't the Content-Length header required when there is a body?

Jason Briggs

unread,
Nov 7, 2013, 8:33:12 AM11/7/13
to stomp...@googlegroups.com
It’s not mandatory:

SEND frames SHOULD include a content-length header and a content-type header if a body is present.

--
You received this message because you are subscribed to the Google Groups "stomp-spec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stomp-spec+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

jgauffin

unread,
Nov 8, 2013, 1:41:54 AM11/8/13
to stomp...@googlegroups.com
A body was included in that message.

Hiram Chirino

unread,
Nov 8, 2013, 8:12:01 AM11/8/13
to stomp-spec
Correct. But it's still not an invalid STOMP message since the header
is not required.
--
Hiram Chirino

Engineering | Red Hat, Inc.

hchi...@redhat.com | fusesource.com | redhat.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo

jgauffin

unread,
Nov 12, 2013, 5:55:07 AM11/12/13
to stomp...@googlegroups.com, hi...@hiramchirino.com
I don't understand.

The specification states "SEND frames SHOULD include a content-length header and a content-type header if a body is present".

And since the message do have a body, how can it not be invalid?

Jason Briggs

unread,
Nov 12, 2013, 5:58:17 AM11/12/13
to stomp...@googlegroups.com, hi...@hiramchirino.com
SHOULD is different from MUST.  In other words, the content-length and content-type headers are not absolutely required.

Jason Briggs

unread,
Nov 12, 2013, 6:29:48 AM11/12/13
to stomp...@googlegroups.com, hi...@hiramchirino.com
PS.  Reading this might help clarify:  http://en.wikipedia.org/wiki/MoSCoW_Method
Reply all
Reply to author
Forward
0 new messages