简体   繁体   English

骆驼-DirectConsumerNotAvailableException端点上没有可用的使用者

[英]Camel - DirectConsumerNotAvailableException No consumers available on endpoint

I have been searching for this issue on Google as well as here on Stackoverflow. 我一直在Google以及Stackoverflow上搜索此问题。 I've seen several others report this same exception, and although I understand what the suggested solution is, I am not 100% if I am witnessing the exact same problem if you will. 我看到其他几个人报告了相同的异常,尽管我知道建议的解决方案是什么,但如果您看到完全相同的问题,我不是100%。

Of course, here's the exception: 当然,这是个例外:

I have a Camel project with two routes. 我有两条路线的骆驼项目。 Here's a simplification: 这是一个简化:

<route>
  <from uri="jetty://http://0.0.0.0:8181/listener"/>
  <to uri="direct:ProcessMessage"/>
</route>

<route>
  <from uri="direct:ProcessMessage"/>
  ...
</route>

So this code snippet works fine most of the time. 因此,此代码段大多数时候都可以正常工作。 However, I was attempting to test the scalability of code. 但是,我正在尝试测试代码的可伸缩性。 At what point does system start to fail? 系统什么时候开始出现故障?

When sending the box 100 messages per second on the listener endpoint above (using Jetty), I start seeing this in the logs: 当在上方的侦听器端点上每秒发送100条消息(使用Jetty)时,我开始在日志中看到此消息:

org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: Endpoint[direct://ProcessMessage]

The solutions I have seen state this occurs because the order of the routes (ie how they're being initialized). 我见过的解决方案指出发生这种情况是因为路由的顺序(即如何初始化路由)。 If that is true in this situation, why does this only happen under heavier load and not all the time? 如果在这种情况下是正确的,为什么仅在较重的负载下而不是在所有时间都发生这种情况?

since it happens only under load, I bet the consumer is getting throttled. 因为它仅在负载下发生,所以我敢打赌消费者会受到限制。 Try using jconsole to monitor the size of the queue. 尝试使用jconsole监视队列的大小。 I'll try looking for a size limit on direct queues. 我将尝试寻找直接队列的大小限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM