mirror of https://github.com/apache/activemq.git
Use the JMS methods to get the bytes in a BytesMessage since those decompress the payload if the content was compressed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@389841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4060ad9231
commit
c80b084cdc
|
@ -79,7 +79,8 @@ public class Subscription {
|
|||
builder.setBody(((ActiveMQTextMessage)m).getText().getBytes("UTF-8"));
|
||||
} else if( m.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE ) {
|
||||
ActiveMQBytesMessage msg = (ActiveMQBytesMessage)m;
|
||||
byte[] data = msg.getContent().getData();
|
||||
byte[] data = new byte[(int)msg.getBodyLength()];
|
||||
msg.readBytes(data);
|
||||
builder.setBody(data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue