Andres Velasco created AMQCPP-427:
-------------------------------------
Summary: Cannot correctly interpret MapMessage from Java broker 5.6
Key: AMQCPP-427
URL: https://issues.apache.org/jira/browse/AMQCPP-427
Project: ActiveMQ C++ Client
Issue Type: Bug
Components: CMS Impl, Openwire
Affects Versions: 3.4.4
Environment: linux, broker version 5.6
Reporter: Andres Velasco
Assignee: Timothy Bish
I am trying to receive MapMessage (in C++) generated from Java application via
broker version 5.6.
The message is received and is interpreted as a MapMessage. However, it reports
all properties as non existent. But I can see the properties using Wireshark.
I have the network capture, but dont find a place to paste it here.
this is the relevant code:
<pre>
// Called from the consumer since this class is a registered
MessageListener.
virtual void onMessage( const Message* message ) throw() {
static int count = 0;
try
{
count++;
const MapMessage* mapMessage =
dynamic_cast<const MapMessage* >( message );
string text = "";
if( mapMessage != NULL ) {
//text = textMessage->getText();
//text = mapMessage->toString();
//text = mapMessage->getString("TEXT");
//text = mapMessage->getString("DESTINATION_ADDRESS");
text = mapMessage->getString("ORIGIN_ADDRESS");
if ( mapMessage->itemExists("TEXT") ) {
printf("EXISTS\n");
}
} else {
text = "NOT A MAP MESSAGE!";
}
--
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