You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "N.S.KARTHIK" <ns...@gmail.com> on 2016/05/19 07:31:15 UTC

Camel DSL & WMQ ... Not Working as expected

Hi

  Followed the WMQ specific configuration from the url  

  URL :
http://camel.465427.n5.nabble.com/Can-Camel-communicate-over-IBM-MQ-sender-receiver-channels-td4429050.html#a4430351

  The route is simple as stated   below

/  <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                          
http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://camel.apache.org/schema/spring
                          
http://camel.apache.org/schema/spring/camel-spring.xsd">

<import resource="../Beans/log_componentTracer.xml"/>
<import resource="../Beans/ibm-wmq-component.xml"/>

<camelContext   xmlns="http://camel.apache.org/schema/spring">
<route streamCache="true">
     <from uri="ibmmq:queue:TESTQ"/>
     <to uri="stream:out"/>
</route>
</camelContext>
</beans>

Jars Used :  com.ibm.mq.jmqi.jar, com.ibm.mqjms.jar, dhbcore.jar
 
Output is as follows  

 INFO | Route: route1 started and consuming from:
Endpoint[ibmmq://queue:TESTQ]
 INFO | Total 1 routes, of which 1 is started.
 INFO | Apache Camel 2.15.0 (CamelContext: camel-1) started in 5.084 seconds
 INFO | Received hang up - stopping the main instance.
 INFO | Apache Camel 2.15.0 stopping
 INFO | Apache Camel 2.15.0 (CamelContext: camel-1) is shutting down
/


Question  : the Queue has messages ,and the same are not being consumed and
streamed to console.

Is any additional configurations needed to be done.

plz advise.

with regards
Karthik







--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel DSL & WMQ ... Not Working as expected

Posted by yogu13 <yo...@gmail.com>.
This should help u..http://camel.apache.org/graceful-shutdown.html

Regards,
-Yogesh

On Wed, May 25, 2016 at 4:49 PM, N.S.KARTHIK [via Camel] <
ml-node+s465427n5783070h99@n5.nabble.com> wrote:

> Hi
>
> Thx for the suggestion
>
> Used the following
>
> main.enableHangupSupport();
>  //main.start();
>  main.run();
>
> This actually helped me in getting the values...thx to u.
>
> Question : If i need to have a Clean Shutdown ...How to handle the same ?
>
>
> with regards
> Karthik
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5783070.html
> To unsubscribe from Camel DSL & WMQ ... Not Working as expected, click
> here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5782772&code=eW9ndTEzQGdtYWlsLmNvbXw1NzgyNzcyfC04ODQzODQxMjM=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5783084.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel DSL & WMQ ... Not Working as expected

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
Hi

Thx for the suggestion

Used the following

main.enableHangupSupport();
 //main.start();
 main.run();

This actually helped me in getting the values...thx to u.

Question : If i need to have a Clean Shutdown ...How to handle the same ?


with regards
Karthik






--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5783070.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel DSL & WMQ ... Not Working as expected

Posted by yogu13 <yo...@gmail.com>.
instead of main.start would suggest main.run()

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5783039.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel DSL & WMQ ... Not Working as expected

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
Hi

  Thx for the observation.

>>Just curious how are you starting you camel ? is it embedded into a
webapp, or through maven etc etc.

 I am running this Camel route by a simple Java main program  as stated
below.

  / Main main=new Main();			  
   main.enableTrace();
   //main.setApplicationContextUri("System/Routers/active-wmq-route.xml");   
   main.setApplicationContextUri("System/Routers/ibm-wmq-route.xml");
   main.enableHangupSupport();
   main.start();/


Note:- Was able to execute the active-wmq-route.xml with Active-Mq profiles
being set.

with regards
Karthik
  



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5782901.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel DSL & WMQ ... Not Working as expected

Posted by yogu13 <yo...@gmail.com>.
Based on this "Received hang up - stopping the main instance." I suspect the
camel's main thread is existing.

Just curious how are you starting you camel ? is it embedded into a webapp,
or through maven etc etc.

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-DSL-WMQ-Not-Working-as-expected-tp5782772p5782896.html
Sent from the Camel - Users mailing list archive at Nabble.com.