我有一个实现Camel和ActiveMQ的系统,用于某些服务器之间的通信。我想知道是否有一种方式,自动过期和清除发送到队列的消息后,X段时间。由于原始服务器(填充队列)将不知道是否有人正在接收消息,所以我不希望队列增长,直到它太大以至于某些东西崩溃。奖励业力指向能够帮助和提供java实现此功能的方法的人。
溶液
// expire message after 2 minutes
long ttl = System.currentTimeMillis() + 120000;
// send our info one-way to the group topic
camelTemplate.sen
追踪:
org.apache.camel.FailedToStartRouteException: Failed to start route FromSAA because of null
at org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:132)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doInitRoutes(InternalRouteStartupManager.java:92)
at org.a