camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfaath <>
Subject Re: Retreiving messageId from JMS queue
Date Mon, 26 Apr 2010 15:19:13 GMT

It's a requirement for the project so the message can be referred to in the
queue.  It seems a little cumbersome to view the message in the queue so I'm
going to see if I can get the requirements changed.  Thanks for the reply

willem.jiang wrote:
> jfaath wrote:
>> I'm wondering if there is a way to retrieve the messageId of the message
>> when
>> a producer sends a message to the queue.  For example, let's say I have
>> these routes:
>> from("wherever").
>> // do lots of stuff
>> to("jms:queue:processed");
>> from("jms:queue:processed")
>> .choice()
>> .when(header("errorsFound").isEqualTo(true))
>> .to("jms:queue:errors")
>> // need to get the message Id here in the errors queue and do stuff with
>> it
>> .otherwise().to("mock:finished"); 
>> After the message is consumed from the "processed" queue, I send it off
>> to
>> the "errors" queue.  However, I'd like to get the messageId in the
>> "errors"
>> queue so I can refer to it later.  I thought running it through a bean
>> and
>> getting the exchange's message id would do it, but it's the id from the
>> "processed" (well, a little different, but parse-able).  Is there any way
>> to
>> get the "errors" queue message id?
> After digging the code of JmsProducer, I don't think there is a way to 
> get the message id that you want from exchange.
> Why do you want to get the jms message id which send to "errors" queue ?
> I don't it is import for camel-jms, as the message id is JMS protocol 
> relate information.
> Willem

View this message in context:
Sent from the Camel - Users (activemq) mailing list archive at

View raw message