Reputation: 421
When I consume a JMS message from queue1 and simply send it to queue2 the message that has landed on queue 2 has:
the messageId on the original message now populated in the breadcrumbId header.
a new messageId.
Can I just transfer the message unchanged, thus keeping the messageId the same?
I've tried forceSendOriginalMessage=true
(and also mapJmsMessage=false
) as below but this made no difference.
from("cMQConnectionFactory1:queue:queue1?forceSendOriginalMessage=true")
.to("cMQConnectionFactory1:queue:queue2")
Upvotes: 0
Views: 111
Reputation: 525
You can't keep JMSMessageID the same. As per specs, it is JMS provider-specific.
When a message is sent, JMSMessageID can be ignored. When the Send or Publish method returns, it contains a provider-assigned value.
The parameter forceSendOriginalMessage
allows you to send the original message, not a copy of it.
Upvotes: 1