gpt4 book ai didi

router - Mule:多播路由器和静态收件人列表路由器有什么区别?

转载 作者:行者123 更新时间:2023-12-04 06:47:21 24 4
gpt4 key购买 nike

我真的看不出多播路由器和静态收件人列表路由器之间的区别。为什么我要使用一个?

根据 Mule-2.x user guide

Recipient List

the Recipient list router can be used to send the same event to multiple endpoints over the same endpoint or to implement routing-slip behaviour where the next destination for the event is determined from the event properties or payload. Mule provides an abstract Recipient list implementation org.mule.routing.outbound.AbstractRecipientList that provides a thread-safe base for specialised implementations. Mule also provides a Static recipient list that takes a configured list of endpoints from the current event or statically declared on the endpoint.


 <outbound>
<static-recipient-list-router>
<payload-type-filter expectedType="javax.jms.Message"/>
<recipients>
<spring:value="jms://orders.queue"/>
<spring:value="jms://tracking.queue"/>
</recipients>
</static-recipient-list-router> </outbound>

Multicasting Router

The Multicasting router can be used to send the same event over multiple endpoints. When using this router care must be taken to configure the correct transformers on the endpoints to handle the event source type.


 <outbound>
<multicasting-router>
<jms:endpoint queue="test.queue"
transformer-refs="StringToJmsMessage"/>
<http:endpoint host="10.192.111.11"
transformer-refs="StringToHttpClientRequest"/>
<tcp:endpoint host="10.192.111.12"
transformer-refs="StringToByteArray"/>
<payload-type-filter expectedType="java.lang.String"/>
</multicasting-router> </outbound>

Remember that care should be taken to ensure that the message being routed is transformed to a format that the endpoint understands.

最佳答案

直接从马口中取出(Mule in Action,David Dossot,John D'Emic,第 98..100 页)

The static-recipient-list router lets you simultaneously send the same message to multiple endpoints. You'll usually use a static recipient list when each endpoint is using the same transport. This is often the case with VM and JMS endpoints.

Use static recipient lists when sending the same message to endpoints using identical transports

The multicasting router is similar to the static recipient list in that it simultaneously sends the same message across a set of outbound endpoints. The difference is that the multicasting router is used when the endpoint list contains different types of transports.

Use the multicasting router when sending the same message to endpoints using different transports

关于router - Mule:多播路由器和静态收件人列表路由器有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3561096/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com