【发布时间】:2012-08-01 05:46:47
【问题描述】:
我用过 mule 3。
在我的流程中,我需要使用队列名称添加选项。
如何从 xml 文件中的消息中获取队列名称?
谢谢!
【问题讨论】:
标签: mule
我用过 mule 3。
在我的流程中,我需要使用队列名称添加选项。
如何从 xml 文件中的消息中获取队列名称?
谢谢!
【问题讨论】:
标签: mule
实际的 JMS 队列或主题在名为 JMSDestination 的 JMS 标头中可用。您可以从名为 JMSDestination 的 mule 中将其提取为命名的消息属性。
生成的 XML 可能如下所示(取决于您的设置方式):
<choice>
<when expression="message.inboundProperties['JMSDestination'].endsWith('.A')">
<!-- do something -->
</when>
<when expression="message.inboundProperties['JMSDestination'].endsWith('.B')">
<! -- do something else -->
</when>
<otherwise>
<! -- do the default -->
</otherwise>
</choice>
【讨论】: