【发布时间】:2021-07-24 11:04:07
【问题描述】:
我有一个简单的 Camel 路由,消耗来自 ActiveMQ 的消息,处理它们并将它们转发到 Rest webservices:
from("activemq:MyQueue").process("MyProcessor").to("http4:uri");
我在activemq-component的connectionfactory中配置concurrentConsumers=100。
在文档中:
if asyncConsumer is disabled(default) then the Exchange is fully processed before the JmsConsumer will pickup the next message from the JMS queue
问题: 在我的路线中,每条消息的交换何时被完全处理? http-callee收到http响应后?如果是这样的话,我想,我的路由配置意味着:
- 一开始,每个消费者消费1条消息并转发到http
- 这 100 个消费者中的每一个都在等待,并且只有在当前 http 调用从当前消息中获得 http 响应时才会再次消费。
另一个问题: 我发现http4组件选项connectionsPerRoute的默认值=20。我有 100 个消费者,我应该设置connectionsPerRoute=100 吗?
谢谢你, 哈迪
【问题讨论】:
标签: apache-camel