如何将交易添加到收件人列表?
我能够根据消息内容发送到动态 URI 列表。我有代码将目的地的 URI 放置在“destination”的标头键中。可以假设返回的 URI 是 JMS URI。
JMS URI 的示例为“jms://jmsEndpoint/queue:outbound_queue?connector=jmsConnector”
如何将事务添加到收件人列表?
<flow name="Flow_Name">
<jms:inbound-endpoint queue="inbound_queue">
<jms:transaction action="ALWAYS_BEGIN" />
</jms:inbound-endpoint>
<!-- Code that adds a list of URI's to the header key of 'destination' -->
<recipient-list expression="destination" evaluator="header" />
</flow>
I am able to send to a list of dynamic URI's based off of the message's contents. I have the code place the URI of the destinations in the header key of 'destination. It can be assumed that the URI coming back is a JMS URI.
An example of the JMS URI is "jms://jmsEndpoint/queue:outbound_queue?connector=jmsConnector"
How do I add transactions to a recipient-list?
<flow name="Flow_Name">
<jms:inbound-endpoint queue="inbound_queue">
<jms:transaction action="ALWAYS_BEGIN" />
</jms:inbound-endpoint>
<!-- Code that adds a list of URI's to the header key of 'destination' -->
<recipient-list expression="destination" evaluator="header" />
</flow>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该文档明确指出:
但 XML 模式不允许您为路由器指定事务配置。我已经检查了 org.mule.routing.outbound.ExpressionRecipientList 的源代码,它应该很好地支持异常。
所以我的印象是,这是 XML 模式的缺失。我可能是错的,但我认为值得打开 JIRA 并看看核心开发人员对这个问题的看法。
The doc clearly states:
But the XML schema doesn't allow you to specify a transaction configuration for the router. I've checked the source code of org.mule.routing.outbound.ExpressionRecipientList and it should support exceptions just fine.
So my impression is that this is a lack in the XML schema. I may be wrong but I think it's worth opening a JIRA and see what the core devs think of the issue.