简体   繁体   English

JMS如何读取队列中的多个文件

[英]How does JMS read multiple files on a queue

The application that I am working on listens to a queue. 我正在处理的应用程序侦听队列。 This queue receives multiple files(Buy/Sell order) from upstream. 该队列从上游接收多个文件(买/卖定单)。 I am new to this application and trying to underatnsd how multiple files are process. 我是这个应用程序的新手,并试图了解如何处理多个文件。 We are using camel to listen to the queue. 我们正在使用骆驼来听队列。 I understand that camel listens to the queue and when a file comes in it reads it and routes it to a java file to process it. 我知道骆驼侦听队列,并且当文件进入时,它会读取它并将其路由到Java文件进行处理。 My question is meanwhile a second or 100 messages arrives on the queue. 我的问题是,同时,一秒或100条消息到达了队列。 How are these multiple files handles..would camel spawn a new thread to keep listening to messages while other thread routes it?? 这些多个文件句柄如何..骆驼会产生一个新线程来继续监听消息,而其他线程路由它吗?

Would camel spawn a new thread to keep listening to messages while other thread routes it? 骆驼会产生一个新的线程来继续监听消息,而其他线程路由它吗?

This depends on your camel jms consumer setup for concurrentConsumers and maxConcurrentConsumers . 这取决于您的骆驼jms使用者设置的concurrentConsumersmaxConcurrentConsumers

concurrentConsumers specify the initial number of concurrent consumer (listener thread/caller thread) for the route. concurrentConsumers指定路由的并发使用者(侦听器线程/调用者线程)的初始数量。 Similarly, maxConcurrentConsumers specify the maximum number of concurrent consumer for the route. 同样, maxConcurrentConsumers指定该路由的最大并发使用者数。

Camel will spawn a new thread for the jms route if maxConcurrentConsumers > concurrentConsumers and hit the limit for consumers. 骆驼将催生一个如果JMS路线一个新的线程maxConcurrentConsumers > concurrentConsumers并击中消费者的极限。

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

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