Camel Duplicate messages on IBM MQ

2016-11-21 Thread Shabin5785
Hi, I have a simple route putting data into a topic. Its given below. from("direct:bb") .marshal().xstream() .setHeader("CamelJmsDestinationName", constant("topic:///mytopic?targetClient=1")) .to("jms:topic:/mytopic?useMessageIDAsCorrelationID=true"); I followed the camel JMS page tutorial

Re: Apace Camel : Custom Redelivery Policy

2016-10-19 Thread Shabin5785
Thanks. Using when to check condition for re-delivery policy works :) -- View this message in context: http://camel.465427.n5.nabble.com/Apace-Camel-Custom-Redelivery-Policy-tp5788891p5788944.html Sent from the Camel - Users mailing list archive at Nabble.com.

Apace Camel : Custom Redelivery Policy

2016-10-18 Thread Shabin5785
I have a route that calls an external rest service. I have configured my error handler as shown below. errorHandler(deadLetterChannel("jms:dlc").maximumRedeliveries(3)); What i want to do: 1) If connection to external api fails, i want to retry 3 times and then send to deadLetterChannel 2) If

Re: Parse Json inside RecipientList

2016-09-29 Thread Shabin5785
here the ID goes > you can fish it out of the header with something like > ${header.customerId}. > > I wrote all that free hand just now with out using an IDE so be suspicious > of the specifics but comfortable with the general approach. > > On Wed, Sep 28, 2016 at 11:35 PM,

Re: Parse Json inside RecipientList

2016-09-28 Thread Shabin5785
sparekh wrote > If the jms message is a serialized POJO then you can use the Camel OGNL > expression to grab the id via body.id before marshalling it to JSON. > > Thanks, > sparekh Message is a serialized pojo. If i extract the id before marshalling, how can i hand it over to the next stage?

Parse Json inside RecipientList

2016-09-28 Thread Shabin5785
Hi, I have a message received as Json. Logging the message body gives me below value (example) { "id":22, "type":"edit"} I need to invoke a rest api which needs the id value from the above json to be included. Api end point is like http://x/api/customer/, where id is the value above. I

Re: Http post Request returns 400 error

2016-09-27 Thread Shabin5785
Great .That worked :) Are the headers from the JMS message that i am receiving being passed on to the POST call as well? I thought only the relevant headers for http call will be passed on. -- View this message in context:

Http post Request returns 400 error

2016-09-27 Thread Shabin5785
I have a camel route configured for reading from a JMS queue and POST it to a service. My route is : from("jms:queue") .marshal() .json(JsonLibrary.GSON) .setHeader(Exchange.CONTENT_TYPE,constant("application/json")) .setHeader(Exchange.HTTP_METHOD, constant("POST")) .process(new Processor1())