activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Johnson <>
Subject AMQ-CPP MapMessage
Date Tue, 05 Feb 2008 20:51:54 GMT

I was trying to use a map message from a C++ program.   It appears to send a
message but none of the fields from the map.   I tested this by modifying
the vs2005-activemq-example to send a MapMessage in the producer:

				MapMessage *message=session->createMapMessage();

and getting one in the consumer:
			const MapMessage * mapMessage=
				dynamic_cast<const MapMessage *>(message);
			if (mapMessage!=NULL) {
				int num=mapMessage->getInt("MsgNum");
				printf("Msg #%d from
			} else {
				printf("Not a map message\n");

Exception was thrown whenever the getInt was called.

I'm using Visual Studio 2005 to build it.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message