0

How to set the correlation id in Spring DSL? The below code doesn't reflect correlation ID in Active MQ

<setHeader headerName="correlationId">
    <constant>IFS123</constant>
</setHeader>

tried with

<setHeader headerName="JMSCorrelationId">
    <constant>IFS456</constant>
</setHeader>
  • At which level of your workflow is your setHeader used ?? – Hassen Bennour May 24 '17 at 07:08
  • I'd be curious to know as to why you would want to set it manually and not let the AMQ Camel component do it for you? – Ralf May 24 '17 at 14:47
  • I need to set Manually because I receive the other message after 1 or 3 months. To trace back the received message after 3 months is really tough and I need to set JMSCorrelationID manually in my case. – Sarada Chelluboyena May 25 '17 at 22:52

1 Answers1

1

The name is the standard JMS name which is JMSCorrelationID notice the upper case ID. You can find the name in the JMS spec: https://docs.oracle.com/javaee/7/api/javax/jms/Message.html

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65