[英]How to stop thread of jms in apache camel
当我使用 jms 消耗 Ibm Mq 时,如何停止 apache 骆驼中的线程? I'm consuming a jms and later I have to consume and Rest api, but I got errors of time out because the thread of jms continues, when is not necessary for the consume of the rest api. 这是我的路线:
from(Rutas.CONSUME_CUENTA_DETALLE)
.routeId("CONSUME_CUENTA_DETALLE")
.removeHeaders("*")
.setHeader("CamelJmsDestinationName",
constant("queue:///"+colaCuentaDetalle+"?targetClient=1"))
.to("jms://queue:" + colaCuentaDetalle
+"?exchangePattern=InOut"
+"&useMessageIDAsCorrelationID=true"
+"&replyToType=Temporary"
+"&requestTimeout=3s"
+"&asyncStopListener=true"
+"&cacheLevelName=CACHE_CONSUMER")
.id("Cuenta_detalle")
.removeHeader("*")
.to(Rutas.VALIDATE_RESPONSE_CUENTA_DETALLE)
.end();
我看不到Rutas.VALIDATE_RESPONSE_CUENTA_DETALLE
是什么类型的消费者,但如果你让它成为SEDA
消费者,它将使用自己的线程池来处理消息,将 JMS 消费者线程返回到自己的池中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.