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