Jorge Omar created AMQCPP-448:
---------------------------------
Summary: Problem to recive a BytesMessage
Key: AMQCPP-448
URL: https://issues.apache.org/jira/browse/AMQCPP-448
Project: ActiveMQ C++ Client
Issue Type: Bug
Components: Other C++ Clients
Affects Versions: 3.5.0
Environment: OS: MAC OSX 10.7.5
IDE: XCODE
Reporter: Jorge Omar
Assignee: Timothy Bish
I recive the ByteMessage with wrong information, but if i compile the same
progrma with api 3.4.5 it works fine:
Here the code:
const TextMessage* textMessage = dynamic_cast< const TextMessage* >( message );
const BytesMessage* bytetMessage = dynamic_cast< const
BytesMessage* >( message );
//const StreamMessage* bytetMessage = dynamic_cast< const
StreamMessage* >( message );
string text = "";
if( textMessage != NULL ) {
text = textMessage->getText();
std::cout << "Message " << count << " Received: " <<
text.c_str() << endl;
}
else if( bytetMessage != NULL ) {
int size = bytetMessage->getBodyLength();
std::cout << "BYTES RECIVIDOS: " << size << endl;
printBytesHex((char*)bytetMessage->getBodyBytes(),size,"BUFFER");
The probles is:
BYTES RECIVIDOS: 59768832
Message Body is Read-Only.
FILE: activemq/commands/ActiveMQBytesMessage.cpp, LINE: 135
At the moment of read message size it reads 59768832 against 32 bytes of my
message that was sended.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira