簡體   English   中英

如何在 apache 駱駝中停止 jms 的線程

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM