骆驼ShutdownStrategy:机上的邮件不会减少 [英] Camel ShutdownStrategy: Inflight Messages do not decrease
问题描述
我使用的是默认关闭的策略在我camelcontext。该路线开始与从队列中消耗超过10k的消息的RabbitMQ消费者。当我停止的路线,消费者不断从队列消耗新的消息。因此,空中交换计数从未递减和路线等待关机,直到默认的超时值(300秒)。有什么办法改变这种行为?基本上停止从消费新邮件时,正在关机的RabbitMQ的消费。
I am using the default shutdown strategy in my camelcontext. The route starts with a rabbitmq consumer which is consuming from a queue with more than 10k messages. When I stop the route, the consumer keeps on consuming new messages from the queue. Hence the inflight exchange count never decrements and the route waits for shutdown until the default timeout value(300s). Is there any way to change this behaviour? Basically stop the rabbitmq consumer from consuming new messages when shutdown is in progress.
推荐答案
我有同样的跟你的问题。问题的关键是关闭的时候,骆驼preFER暂停消费者不是关闭它们。目前的RabbitMQ消费者没有实现暂停()方法。这个问题将在版本2.16.2修正
I have the same the problem with you. The point is when shutting down, Camel prefer suspending consumers than shutting down them. Currently RabbitMQ consumer does not implement the suspend() method. The problem will be fix in version 2.16.2
这篇关于骆驼ShutdownStrategy:机上的邮件不会减少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!