我正在尝试对代码进行改进以利用Jgroups / controlbus,但是,我需要一个Blueprint XML表示形式。
如何在骆驼路线上实施预定义的过滤器和延迟?
<route autoStartup="true" id="clusterControlRoute">
<from uri="jgroups:fleetPredixCluster?enableViewMessages=true&channelProperties=etc/jgroups.xml" />
<!--
.filter(dropNonCoordinatorViews())
.threads().delay(delayIfContextNotStarted(SECONDS.toMillis(5))) // run in separated and delayed thread. Delay only if the context hasn't been started already.
.log(LoggingLevel.INFO,"Starting JGroups JChannel Consumer!!!!!!!!!!!!!!!!!!!!!")
-->
<to uri="controlbus:route?routeId=inRouteMT1&action=start&async=true"/>
</route>
如何通过XML使用这些预定义的过滤器和表达式?
<filter><simple> JGroupsFilters.dropNonCoordinatorViews() </simple></filter>
<threads><delay> delayIfContextNotStarted(SECONDS.toMillis(5) </delay></threads>