Hi,
No you can't do this with any broker. It is against JMS specification.
https://javaee.github.io/javaee-spec/javadocs/javax/jms/Message.html#setJMSMessageID-java.lang.String-

Dne 1.3.2020 v 11:29 nomit babraa napsal(a):
Hi
Thanks for that.
Can I get the Broker (AMQ) to not assign a new MessageId?
Cheers
N

On Sun, 1 Mar 2020 at 10:09, Claus Ibsen <claus.ib...@gmail.com> wrote:

Hi

You cannot keep JMSMessageID as its an ID that is 100% assigned by the
message broker. Clients cannot control it.

On Sat, Feb 29, 2020 at 4:50 PM nomit babraa <h.bab...@sheffield.ac.uk>
wrote:
Hi

When I consume a message from Queue1 and simply send it to Queue2, the
message that has landed on Queue 2 has:

1) the messageId on the original message now populated in the
breadcrumbId
header.
2) a new messageId.

Can I just transfer the message unchanged 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")
.routeId("testMove_cJMS_1")
.to("cMQConnectionFactory1:queue:queue2")
.id("testMove_cJMS_2");

thanks for any advice

n


--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Reply via email to