我有两台服务器需要相同的提要信息(产品和测试)。以下确实有效:
<ns2:route id="JSON-INT" xmlns:ns2="http://camel.apache.org/schema/spring">
<ns2:from uri="mq:MY.MQ.FEED"/>
<ns2:marshal ref="feedToJsonTransformer" id="marshal2"/>
<ns2:to uri="direct:internal" id="to5"/>
</ns2:route>
<ns2:route id="INT-PROD-AND-TEST-INTERNAL" xmlns:ns2="http://camel.apache.org/schema/spring">
<ns2:from uri="direct:internal"/>
<ns2:multicast stopOnException="false" id="multicast1">
<ns2:to uri="direct:prod" id="to6"/>
<ns2:to uri="direct:test" id="to7"/>
</ns2:multicast>
</ns2:route>
<ns2:route id="INT-PROD" xmlns:ns2="http://camel.apache.org/schema/spring">
<ns2:from uri="direct:prod"/>
<ns2:to uri="jms:appProd" id="to8"/>
</ns2:route>
<ns2:route id="INT-TEST" xmlns:ns2="http://camel.apache.org/schema/spring">
<ns2:from uri="direct:test"/>
<ns2:to uri="jms:appTest" id="to9"/>
</ns2:route>
但是,当我在大约一个小时后关闭我的测试服务器(并不总是需要它并且要花钱)时,生产服务器停止接收消息。我假设队列正在填满并停止该过程?如果测试服务器关闭,有没有办法忽略它?