Java 骆驼聚集等待锁

Java 骆驼聚集等待锁,java,apache-camel,Java,Apache Camel,我有一个Camel 2.25.0路由,它监听一个在密钥上聚合的JMS队列。聚合配置有10分钟的完成超时、一个LevelDBAggregationRepository和UselateStaggegationStrategy from("jms:inbound") .log("Received views change stream") .bean(viewService, "updateDependencies&qu

我有一个Camel 2.25.0路由,它监听一个在密钥上聚合的JMS队列。聚合配置有10分钟的完成超时、一个
LevelDBAggregationRepository
UselateStaggegationStrategy

from("jms:inbound")
        .log("Received views change stream")
        .bean(viewService, "updateDependencies")
        .aggregate()
        .header("JMSXGroupID")
        .aggregationStrategy(new UseLatestAggregationStrategy())
        .completionTimeout(600000) // 10 minutes
        .completeAllOnStop()
        .aggregationRepository(new LevelDBAggregationRepository("aggregation-repository", "./aggregation-repository"))
        .log("Process views change stream")
        .to("jms:outbound");
有时,线程会被阻塞,队列不会被占用。当发生这种情况时,日志显示在
updateDependencies
调用和聚合开始之间存在等待
XXXX
是上一次聚合的结束,
yyy
是阻止的聚合

APM duration: 1,073.2s
August 7th 2020, 11:39:20.327   onAggregation +++  end  +++ with correlation key: XXXX
August 7th 2020, 11:39:20.327   Received views change stream
August 7th 2020, 11:39:20.341   1 documents touched based on update // log from updateDependencies
August 7th 2020, 11:57:13.555   onAggregation +++ start +++ with correlation key: YYYY
在聚合处理器中,聚合前有一个锁

lock.lock();
try {
    aggregated = doAggregation(key, copy);
} finally {
    lock.unlock();
}
我的猜测是等待时间是由于锁造成的,但这没有意义,因为我们可以看到前面的聚合(
XXXX
)已经完成,所以应该释放锁

我还检查了应用程序,其他线程仍在运行