Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add content-length header only for messages containing zero byte #8

wants to merge 2 commits into
base: master


1 participant
Copy link

commented Aug 18, 2015


Now php5-stomp always adds 'content-length' header to all messages being sent. This makes sending JMS "TextMessage" (including XML!) impossible, because most JMS/STOMP queues like OpenMQ or ActiveMQ decide whether the message is JMS "BytesMessage" or "TextMessage" based on the presence of 'content-length' header (as described here: and here: I.e. if it is there, the message is treated as bytes. So JMS can never decode messages sent from php5-stomp as XML, because it wants XML to be TextMessages.

And XML is obviously the thing that you want the most when connecting to a JMS queue via STOMP! :)

This pull request fixes this behaviour by making php5-stomp only add content-length header for messages with zero byte.


Vitaliy Filippov added some commits Aug 18, 2015

Vitaliy Filippov
Only add content-length header for messages containing zero byte
Allows OpenMQ/ActiveMQ to correctly map messages to JMS TextMessages
instead of only BytesMessages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.