【发布时间】:2013-12-07 22:26:39
【问题描述】:
我有一个要求,我需要从 .NET 端向 ACTIVEMQ 发送一些消息。我发送的是这样的:
string destination="queue.name";
Hashtable message = new Hashtable();
message.Add("id", id);
message.Add("companyid", 12435);
message.Add("message", "Hello World");
Apache.NMS.ActiveMQ.ConnectionFactory connectionFactory = new ConnectionFactory(URI);
Spring.Messaging.Nms.Core.NmsTemplate template = new Spring.Messaging.Nms.Core.NmsTemplate(connectionFactory);
template.ConvertAndSend(destination, message);
这就是我们正在做的。但是现在侦听器期望“id”和“companyid”出现在标头上,“message”出现在有效载荷上。
如何将它从 .NET 发送到 ActiveMQ?任何帮助将不胜感激。
问候, 尼米
【问题讨论】:
标签: asp.net .net apache activemq