0
我想这个逻辑在Apache骆驼的Java应用程序解码: ReadFromActiveMq文件,并将它们发送到直接的路线DirectRoute 虽然existsFilesInFolder { retrytoLoadThemForever()//虽然错误出现 - >手动动作 要求 } 消耗DirectRoute消息。暂停根据文件夹内容的Apache的骆驼航线
在java中我有这样做:
onManualDataReceivedException().maximumRedeliveries(-1)
from("file:" + recoverableErrorsFolder +"?noop=true").to("bean:processManualFilesDatabean");
//If there is an error in manual process i throw ManualDataReceivedException
from ("direct:DirectRoute")
.to("bean:processDirectQueueBean");
private OnExceptionDefinition onManualDataReceivedException() {
return onException(ManualDataReceivedException.class);
}
如何暂停直接:DirectRoute消费是否有recoverableErrorsFolder文件夹中的文件?
That worked.Thanks – user4919313