You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Thomas Johnson (JIRA)" <ji...@apache.org> on 2008/02/06 15:06:43 UTC

[jira] Commented: (AMQCPP-166) MapMessage does not send mapped fields

    [ https://issues.apache.org/activemq/browse/AMQCPP-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41237#action_41237 ] 

Thomas Johnson commented on AMQCPP-166:
---------------------------------------

Never mind the Marshall part, I did not see the TextMessage get Marshalled either and it works fine.


> MapMessage does not send mapped fields
> --------------------------------------
>
>                 Key: AMQCPP-166
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-166
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.1.3
>         Environment: 32-bit XP client with client compiled under VS 2005, ActiveMQ v5.0 is running on a 32-bit Windows 2003 server.
>            Reporter: Thomas Johnson
>            Assignee: Nathan Mittler
>
> Modified the vs2005-activemq-example's HelloWorldProducer to use a map message:
> 				MapMessage *message=session->createMapMessage();
> 				message->setInt("MsgNum",ix);
> 				message->setString("Thread",threadIdStr.c_str());
>                 producer->send( message );
> and the HelloWorldConsumer to receive it:
> 			const MapMessage * mapMessage=
> 				dynamic_cast<const MapMessage *>(message);
> 			if (mapMessage!=NULL) {
> 				int num=mapMessage->getInt("MsgNum");
> 				printf("Msg #%d from thread %s\n",num,mapMessage->getString("Thread").c_str());
> 			} else {
> 				printf("Not a map message\n");
> 			}
> The getInt with Msgnum throw a field not in map exception.   After closer inspection, the map was empty.   Also, while not an expert in the code, but I tried tracing it through the producer->send and as far as I could tell, the map was never marshalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.