You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/02/03 16:08:18 UTC
svn commit: r1563943 -
/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs
Author: tabish
Date: Mon Feb 3 15:08:17 2014
New Revision: 1563943
URL: http://svn.apache.org/r1563943
Log:
https://issues.apache.org/jira/browse/AMQNET-454
applied:
https://issues.apache.org/jira/secure/attachment/12626648/Apache.NMS.AMQP-fix-map-message-body-14.patch
Modified:
activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs
Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs?rev=1563943&r1=1563942&r2=1563943&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/DefaultMessageConverter.cs Mon Feb 3 15:08:17 2014
@@ -196,8 +196,9 @@ namespace Apache.NMS.Amqp
{
MapMessage mapMessage = message as MapMessage;
PrimitiveMap mapBody = mapMessage.Body as PrimitiveMap;
- byte[] buf = mapBody.Marshal();
- Message result = new Message(buf, 0, buf.Length);
+ Dictionary<string, object> dict = FromNmsPrimitiveMap(mapBody);
+
+ Message result = new Message(dict);
return result;
}
else if (message is StreamMessage)
@@ -223,11 +224,17 @@ namespace Apache.NMS.Amqp
if ("amqp/map" == message.ContentType)
{
- // TODO: Return map message
+ Dictionary<string, object> dict = new Dictionary<string,object>();
+ message.GetContent(dict);
+ PrimitiveMap bodyMap = new PrimitiveMap();
+ SetNmsPrimitiveMap(bodyMap, dict);
+ MapMessage mapMessage = new MapMessage();
+ mapMessage.Body = bodyMap;
+ result = mapMessage;
}
else if ("amqp/list" == message.ContentType)
{
- // TODO: Return list message
+ // TODO: Return list message
}
else
{