Apache camel 当达到限制限制时,如何向目录发送camel保留消息?
我想在一小时内接受前100条消息,并通过名为handleMessage的bean处理这些消息。然后,任何超过100条限制的消息,我只想将它们放在一个目录中(或传递到一个单独的bean),并且永远不要通过主处理bean发送它们。当前,如果接收到101条消息,则在1小时时间限制到期后,第101条消息将被保留并由“handleMessage”处理Apache camel 当达到限制限制时,如何向目录发送camel保留消息?,apache-camel,Apache Camel,我想在一小时内接受前100条消息,并通过名为handleMessage的bean处理这些消息。然后,任何超过100条限制的消息,我只想将它们放在一个目录中(或传递到一个单独的bean),并且永远不要通过主处理bean发送它们。当前,如果接收到101条消息,则在1小时时间限制到期后,第101条消息将被保留并由“handleMessage”处理 <route> <from uri="file://inputdir/"/> <!-- throttle 10
<route>
<from uri="file://inputdir/"/>
<!-- throttle 100 messages per hour -->
<throttle timePeriodMillis="3600000">
<constant>100</constant>
<bean name="handleMessage" method="process"/>
</throttle>
</route>
100
节流器不支持此功能,它将始终保留消息,并在时间段可用时稍后执行这些消息
您需要编写自己的定制eip/bean/处理器来满足您的需求