Stomp content-length header not being set on BytesMessage
---------------------------------------------------------
Key: AMQCPP-35
URL: https://issues.apache.org/activemq/browse/AMQCPP-35
Project: ActiveMQ C++ Client
Issue Type: Bug
Components: Stomp
Affects Versions: 1.1
Reporter: Albert Strasheim
Assigned To: Nathan Mittler
Not sure if this is a bug or if I'm just doing something wrong, but here goes.
On a cms::Session I'm calling createBytesMessage and getting back a
cms::BytesMessage which is an
activemq::connector::stomp::commands::BytesMessageCommand underneath. On this
message I set an int property and write a string using writeString. Then I send
the message to my producer. At no point does it seem as if the content-length
header is set in this case. I verified by checking the properties written out
for this message in StompCommandWriter::writeCommand. Due to the absence of
this header, when AMQCPP receives this message, it assumes it is a
TextMessageCommand instead of a BytesMessageCommand.
The only way the header can get set is by something calling setBytes on the
BytesMessageCommand which calls through to setBytes of AbstractCommand which
sets the header. I don't think this happens when one only does a writeString.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira