This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 2936afb07 Fix #3344: JMS sources send an answer only to the JMSReplyTo 
of the incoming message, unchanged by the flow (#3345)
2936afb07 is described below

commit 2936afb07826c44e45b7b072a6c286419bfdc612
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Nov 22 09:51:12 2026 +0100

    Fix #3344: JMS sources send an answer only to the JMSReplyTo of the 
incoming message, unchanged by the flow (#3345)
    
    camel-jms already picks where to answer before the flow runs: 
EndpointMessageListener takes the reply
    destination from the JMSReplyTo of the incoming message (or the endpoint's 
replyTo option), and sends
    no answer for a message without one. Headers set during the flow, such as 
JMSReplyTo or
    CamelJmsDestinationName, neither redirect the answer nor make one.
    
    They still shape the answer message: a JMSReplyTo header set by the flow 
becomes the JMSReplyTo of the
    answer (Artemis dropped it, so the answer had no JMSReplyTo at all; on IBM 
MQ the answer then failed with
    MQRC_MISSING_REPLY_TO_Q). jms-apache-artemis-source, jms-amqp-10-source and 
jms-ibm-mq-source now keep
    the JMSReplyTo of the incoming message in a variable, put it back after the 
flow, and remove the
    CamelJms* headers the flow set. Request-reply keeps working.
    
    Each description says so in Good to know, and a Citrus test per source 
checks request-reply, a flow
    that sets JMSReplyTo and CamelJmsDestinationName to another queue, and a 
message without JMSReplyTo.
    
    
    Claude-Session: https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 kamelets/jms-amqp-10-source.kamelet.yaml           |  17 ++-
 kamelets/jms-apache-artemis-source.kamelet.yaml    |  17 ++-
 kamelets/jms-ibm-mq-source.kamelet.yaml            |  17 ++-
 .../main/resources/META-INF/kamelets-index.json    |   6 +-
 .../kamelets/jms-amqp-10-source.kamelet.yaml       |  17 ++-
 .../jms-apache-artemis-source.kamelet.yaml         |  17 ++-
 .../kamelets/jms-ibm-mq-source.kamelet.yaml        |  17 ++-
 .../jms-amqp-10-source-reply-route.citrus.it.yaml  | 151 ++++++++++++++++++++
 .../jms/jms-amqp-10-source-reply-route.yaml        |  93 ++++++++++++
 ...pache-artemis-source-reply-route.citrus.it.yaml | 151 ++++++++++++++++++++
 .../jms/jms-apache-artemis-source-reply-route.yaml |  93 ++++++++++++
 .../jms-ibm-mq-source-reply-route.citrus.it.yaml   | 158 +++++++++++++++++++++
 .../jms/jms-ibm-mq-source-reply-route.yaml         | 100 +++++++++++++
 13 files changed, 845 insertions(+), 9 deletions(-)

diff --git a/kamelets/jms-amqp-10-source.kamelet.yaml 
b/kamelets/jms-amqp-10-source.kamelet.yaml
index 9a383ec2f..85a3aaade 100644
--- a/kamelets/jms-amqp-10-source.kamelet.yaml
+++ b/kamelets/jms-amqp-10-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, bytes for a bytes 
message, and a Map for a map message. The JMS properties of the message become 
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`, 
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
 
-      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
+      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
     required:
       - destinationName
       - remoteURI
@@ -160,5 +160,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{connectionFactoryBean}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git a/kamelets/jms-apache-artemis-source.kamelet.yaml 
b/kamelets/jms-apache-artemis-source.kamelet.yaml
index 8af173767..09073ac29 100644
--- a/kamelets/jms-apache-artemis-source.kamelet.yaml
+++ b/kamelets/jms-apache-artemis-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, bytes for a bytes 
message, and a Map for a map message. The JMS properties of the message become 
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`, 
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
 
-      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
+      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
     required:
       - destinationName
       - brokerURL
@@ -160,5 +160,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{connectionFactoryBean}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git a/kamelets/jms-ibm-mq-source.kamelet.yaml 
b/kamelets/jms-ibm-mq-source.kamelet.yaml
index d756875ae..65b1b294a 100644
--- a/kamelets/jms-ibm-mq-source.kamelet.yaml
+++ b/kamelets/jms-ibm-mq-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, and bytes for a bytes 
message. The JMS properties of the message become headers, along with the JMS 
headers such as `JMSMessageID` and `JMSTimestamp`, and IBM MQ details such as 
`JMSXUserID`, `JMS_IBM_PutDate` and `JMS_IBM_Format`.
 
-      Good to know: the IBM MQ client library is not included, as its licence 
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a 
version to the dependencies of the integration (Camel JBang adds it by itself). 
From a queue, each message is removed when it is received, even when the rest 
of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of th [...]
+      Good to know: the IBM MQ client library is not included, as its licence 
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a 
version to the dependencies of the integration (Camel JBang adds it by itself). 
From a queue, each message is removed when it is received, even when the rest 
of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of th [...]
     required:
       - serverName
       - serverPort
@@ -194,5 +194,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{wmqConnectionFactory}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git 
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json 
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index 3d5fa2631..6fe8205c1 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -1215,7 +1215,7 @@
     "supportLevel" : "Stable",
     "title" : "JMS - AMQP 1.0 Source",
     "summary" : "Receives each message from a queue or a topic in a message 
broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through JMS and 
the Apache Qpid client.",
-    "description" : "Receives each message from a queue or a topic in a 
message broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through 
JMS and the Apache Qpid client.\n\nUse it to process work that other 
applications put on a queue, or to react to events published on a topic, on any 
broker that supports the AMQP 1.0 protocol. For an Artemis broker, 
`jms-apache-artemis-source` works too.\n\nOutput: the body is text for a JMS 
text message, bytes for a bytes message, and a Ma [...]
+    "description" : "Receives each message from a queue or a topic in a 
message broker that speaks AMQP 1.0, such as Apache ActiveMQ Artemis, through 
JMS and the Apache Qpid client.\n\nUse it to process work that other 
applications put on a queue, or to react to events published on a topic, on any 
broker that supports the AMQP 1.0 protocol. For an Artemis broker, 
`jms-apache-artemis-source` works too.\n\nOutput: the body is text for a JMS 
text message, bytes for a bytes message, and a Ma [...]
     "group" : "JMS",
     "namespace" : "Messaging",
     "provider" : "Apache Software Foundation"
@@ -1235,7 +1235,7 @@
     "supportLevel" : "Stable",
     "title" : "JMS - Apache Artemis Source",
     "summary" : "Receives each message from a queue or a topic in an Apache 
ActiveMQ Artemis broker, through JMS.",
-    "description" : "Receives each message from a queue or a topic in an 
Apache ActiveMQ Artemis broker, through JMS.\n\nUse it to process work that 
other applications put on a queue, such as orders or jobs, or to react to 
events published on a topic. For another broker that speaks AMQP 1.0, use 
`jms-amqp-10-source`.\n\nOutput: the body is text for a JMS text message, bytes 
for a bytes message, and a Map for a map message. The JMS properties of the 
message become headers, along with the  [...]
+    "description" : "Receives each message from a queue or a topic in an 
Apache ActiveMQ Artemis broker, through JMS.\n\nUse it to process work that 
other applications put on a queue, such as orders or jobs, or to react to 
events published on a topic. For another broker that speaks AMQP 1.0, use 
`jms-amqp-10-source`.\n\nOutput: the body is text for a JMS text message, bytes 
for a bytes message, and a Map for a map message. The JMS properties of the 
message become headers, along with the  [...]
     "group" : "JMS",
     "namespace" : "Messaging",
     "provider" : "Apache Software Foundation"
@@ -1255,7 +1255,7 @@
     "supportLevel" : "Stable",
     "title" : "JMS - IBM MQ Source",
     "summary" : "Receives each message from a queue or a topic of an IBM MQ 
queue manager, through JMS.",
-    "description" : "Receives each message from a queue or a topic of an IBM 
MQ queue manager, through JMS.\n\nUse it to process work or events that other 
applications put on IBM MQ, such as an existing enterprise or mainframe system. 
Use `jms-ibm-mq-sink` to send to IBM MQ.\n\nOutput: the body is text for a JMS 
text message, and bytes for a bytes message. The JMS properties of the message 
become headers, along with the JMS headers such as `JMSMessageID` and 
`JMSTimestamp`, and IBM MQ de [...]
+    "description" : "Receives each message from a queue or a topic of an IBM 
MQ queue manager, through JMS.\n\nUse it to process work or events that other 
applications put on IBM MQ, such as an existing enterprise or mainframe system. 
Use `jms-ibm-mq-sink` to send to IBM MQ.\n\nOutput: the body is text for a JMS 
text message, and bytes for a bytes message. The JMS properties of the message 
become headers, along with the JMS headers such as `JMSMessageID` and 
`JMSTimestamp`, and IBM MQ de [...]
     "group" : "JMS",
     "namespace" : "Messaging",
     "provider" : "Apache Software Foundation"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
index 9a383ec2f..85a3aaade 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jms-amqp-10-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, bytes for a bytes 
message, and a Map for a map message. The JMS properties of the message become 
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`, 
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
 
-      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
+      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
     required:
       - destinationName
       - remoteURI
@@ -160,5 +160,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{connectionFactoryBean}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
index 8af173767..09073ac29 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jms-apache-artemis-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, bytes for a bytes 
message, and a Map for a map message. The JMS properties of the message become 
headers, along with the JMS headers such as `JMSMessageID`, `JMSDestination`, 
`JMSTimestamp`, `JMSPriority` and `JMSRedelivered`.
 
-      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
+      Good to know: From a queue, each message is removed when it is received, 
even when the rest of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of this source share the messages of 
a queue, and `concurrentConsumers` processes several messages at the same time. 
From a topic (`destinationType` set to `topic`), it receives only the messages 
sent while it is connect [...]
     required:
       - destinationName
       - brokerURL
@@ -160,5 +160,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{connectionFactoryBean}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
index d756875ae..65b1b294a 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/jms-ibm-mq-source.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
 
       Output: the body is text for a JMS text message, and bytes for a bytes 
message. The JMS properties of the message become headers, along with the JMS 
headers such as `JMSMessageID` and `JMSTimestamp`, and IBM MQ details such as 
`JMSXUserID`, `JMS_IBM_PutDate` and `JMS_IBM_Format`.
 
-      Good to know: the IBM MQ client library is not included, as its licence 
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a 
version to the dependencies of the integration (Camel JBang adds it by itself). 
From a queue, each message is removed when it is received, even when the rest 
of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of th [...]
+      Good to know: the IBM MQ client library is not included, as its licence 
is not the Apache one: add `mvn:com.ibm.mq:com.ibm.mq.jakarta.client` with a 
version to the dependencies of the integration (Camel JBang adds it by itself). 
From a queue, each message is removed when it is received, even when the rest 
of the flow then fails, unless `transacted` is true or 
`acknowledgementModeName` is `CLIENT_ACKNOWLEDGE`: then a message whose flow 
failed is delivered again. Several copies of th [...]
     required:
       - serverName
       - serverPort
@@ -194,5 +194,20 @@ spec:
         acknowledgementModeName: "{{?acknowledgementModeName}}"
         connectionFactory: "#bean:{{wmqConnectionFactory}}"
       steps:
+        # camel-jms sends an answer only to the JMSReplyTo of the incoming 
message, chosen before the
+        # flow runs. The flow must not shape the answer either: the JMSReplyTo 
header goes back to the
+        # value it had, and no CamelJms* header set by the flow is left to 
steer how the answer is sent.
+        - setVariable:
+            name: kameletJmsReplyTo
+            expression:
+              simple:
+                expression: "${header.JMSReplyTo}"
         - to:
             uri: kamelet:sink
+        - setHeader:
+            name: JMSReplyTo
+            expression:
+              simple:
+                expression: "${variable.kameletJmsReplyTo}"
+        - removeHeaders:
+            pattern: CamelJms*
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.citrus.it.yaml
new file mode 100644
index 000000000..f2f986d19
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.citrus.it.yaml
@@ -0,0 +1,151 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: jms-amqp-10-source-reply-route-test
+description: 'jms-amqp-10-source sends the answer only to the JMSReplyTo of 
the incoming message, in Artemis, over AMQP 1.0: headers set in the flow 
neither send it to another queue nor make one for a message without JMSReplyTo'
+actions:
+  # Start Artemis
+  - testcontainers:
+      start:
+        container:
+          name: "artemis"
+          image: "apache/activemq-artemis:2.44.0"
+          autoRemove: true
+          startUpTimeout: 180
+          exposedPorts:
+            - 61616
+          waitFor:
+            logMessage: '.*AMQ221007: Server is now active.*'
+
+  # Create Camel JBang integration
+  - camel:
+      cli:
+        run:
+          waitForRunningState: false
+          args:
+            - "--dep=camel:amqp"
+          integration:
+            file: "jms/jms-amqp-10-source-reply-route.yaml"
+            systemProperties:
+              properties:
+                - name: "http.sink.url"
+                  value: "http://localhost:${http.server.port}";
+                - name: "amqp.remote.uri"
+                  value: 
"amqp://${CITRUS_TESTCONTAINERS_ARTEMIS_HOST}:${CITRUS_TESTCONTAINERS_ARTEMIS_PORT}"
+
+  # Request 1 names a queue to reply to; the flow sets JMSReplyTo and 
CamelJmsDestinationName to another queue
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer goes back to the JMSReplyTo of the request, with the JMSReplyTo 
of the request, not the one the flow set
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(replies)@'
+          body:
+            data: 'answer to request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 2 has no JMSReplyTo; the flow sets the same headers
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 2'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 3 names a queue to reply to again, so request 2 is done
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer to request 3
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(replies)@'
+          body:
+            data: 'answer to request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Nothing reached the queue named by the headers of the flow
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/elsewhere"
+          type: "plaintext"
+          body:
+            data: 'nothing'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.yaml
new file mode 100644
index 000000000..bc7547fe4
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-amqp-10-source-reply-route.yaml
@@ -0,0 +1,93 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+# an application that sends requests and waits for the replies
+- beans:
+    - name: requester
+      type: "org.apache.qpid.jms.JmsConnectionFactory"
+      properties:
+        remoteURI: '{{amqp.remote.uri}}'
+        username: 'artemis'
+        password: 'artemis'
+
+- route:
+    from:
+      uri: "kamelet:jms-amqp-10-source"
+      parameters:
+        remoteURI: '{{amqp.remote.uri}}'
+        destinationName: 'requests'
+        username: 'artemis'
+        password: 'artemis'
+      steps:
+        - setProperty:
+            name: request
+            simple: "${body}"
+        - to:
+            uri: "{{http.sink.url}}/request"
+        # headers that name another queue: they must not change where the 
answer goes, nor make one
+        - setHeader:
+            name: JMSReplyTo
+            constant: 'elsewhere'
+        - setHeader:
+            name: CamelJmsDestinationName
+            constant: 'elsewhere'
+        - setBody:
+            simple: 'answer to ${exchangeProperty.request}'
+
+# an application that sends requests: 1 and 3 wait for the answer on the queue 
replies, 2 expects none
+- route:
+    from:
+      uri: "timer:send"
+      parameters:
+        repeatCount: 1
+      steps:
+        - setBody:
+            constant: 'request 1'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOut&replyTo=replies&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'request 2'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOnly"
+        - setBody:
+            constant: 'request 3'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOut&replyTo=replies&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        # what reached the queue named by the headers of the flow
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'nothing'
+        - pollEnrich:
+            constant: "jms:queue:elsewhere?connectionFactory=#requester"
+            timeout: 3000
+        - setBody:
+            simple: "${body} ?: 'nothing'"
+        - to:
+            uri: "{{http.sink.url}}/elsewhere"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.citrus.it.yaml
new file mode 100644
index 000000000..5a7285afa
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.citrus.it.yaml
@@ -0,0 +1,151 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: jms-apache-artemis-source-reply-route-test
+description: 'jms-apache-artemis-source sends the answer only to the 
JMSReplyTo of the incoming message, in Artemis: headers set in the flow neither 
send it to another queue nor make one for a message without JMSReplyTo'
+actions:
+  # Start Artemis
+  - testcontainers:
+      start:
+        container:
+          name: "artemis"
+          image: "apache/activemq-artemis:2.44.0"
+          autoRemove: true
+          startUpTimeout: 180
+          exposedPorts:
+            - 61616
+          waitFor:
+            logMessage: '.*AMQ221007: Server is now active.*'
+
+  # Create Camel JBang integration
+  - camel:
+      cli:
+        run:
+          waitForRunningState: false
+          args:
+            - "--dep=mvn:org.apache.activemq:artemis-jakarta-client-all:2.57.0"
+          integration:
+            file: "jms/jms-apache-artemis-source-reply-route.yaml"
+            systemProperties:
+              properties:
+                - name: "http.sink.url"
+                  value: "http://localhost:${http.server.port}";
+                - name: "artemis.broker.url"
+                  value: 
"tcp://${CITRUS_TESTCONTAINERS_ARTEMIS_HOST}:${CITRUS_TESTCONTAINERS_ARTEMIS_PORT}"
+
+  # Request 1 names a queue to reply to; the flow sets JMSReplyTo and 
CamelJmsDestinationName to another queue
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer goes back to the JMSReplyTo of the request, with the JMSReplyTo 
of the request, not the one the flow set
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(replies)@'
+          body:
+            data: 'answer to request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 2 has no JMSReplyTo; the flow sets the same headers
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 2'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 3 names a queue to reply to again, so request 2 is done
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer to request 3
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(replies)@'
+          body:
+            data: 'answer to request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Nothing reached the queue named by the headers of the flow
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/elsewhere"
+          type: "plaintext"
+          body:
+            data: 'nothing'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.yaml
new file mode 100644
index 000000000..2e6876f0d
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-apache-artemis-source-reply-route.yaml
@@ -0,0 +1,93 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+# an application that sends requests and waits for the replies
+- beans:
+    - name: requester
+      type: "org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory"
+      properties:
+        brokerURL: '{{artemis.broker.url}}'
+        user: 'artemis'
+        password: 'artemis'
+
+- route:
+    from:
+      uri: "kamelet:jms-apache-artemis-source"
+      parameters:
+        brokerURL: '{{artemis.broker.url}}'
+        destinationName: 'requests'
+        username: 'artemis'
+        password: 'artemis'
+      steps:
+        - setProperty:
+            name: request
+            simple: "${body}"
+        - to:
+            uri: "{{http.sink.url}}/request"
+        # headers that name another queue: they must not change where the 
answer goes, nor make one
+        - setHeader:
+            name: JMSReplyTo
+            constant: 'elsewhere'
+        - setHeader:
+            name: CamelJmsDestinationName
+            constant: 'elsewhere'
+        - setBody:
+            simple: 'answer to ${exchangeProperty.request}'
+
+# an application that sends requests: 1 and 3 wait for the answer on the queue 
replies, 2 expects none
+- route:
+    from:
+      uri: "timer:send"
+      parameters:
+        repeatCount: 1
+      steps:
+        - setBody:
+            constant: 'request 1'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOut&replyTo=replies&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'request 2'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOnly"
+        - setBody:
+            constant: 'request 3'
+        - to:
+            uri: 
"jms:queue:requests?connectionFactory=#requester&exchangePattern=InOut&replyTo=replies&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        # what reached the queue named by the headers of the flow
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'nothing'
+        - pollEnrich:
+            constant: "jms:queue:elsewhere?connectionFactory=#requester"
+            timeout: 3000
+        - setBody:
+            simple: "${body} ?: 'nothing'"
+        - to:
+            uri: "{{http.sink.url}}/elsewhere"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.citrus.it.yaml
new file mode 100644
index 000000000..1c8295660
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.citrus.it.yaml
@@ -0,0 +1,158 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: jms-ibm-mq-source-reply-route-test
+description: 'jms-ibm-mq-source sends the answer only to the JMSReplyTo of the 
incoming message, in IBM MQ: headers set in the flow neither send it to another 
queue nor make one for a message without JMSReplyTo'
+actions:
+  # Start IBM MQ
+  - testcontainers:
+      start:
+        container:
+          name: "ibmmq"
+          image: "icr.io/ibm-messaging/mq:10.0.1.0-r1"
+          autoRemove: true
+          startUpTimeout: 300
+          env:
+            - name: "LICENSE"
+              value: "accept"
+            - name: "MQ_QMGR_NAME"
+              value: "QM1"
+            - name: "MQ_APP_PASSWORD"
+              value: "passw0rd"
+          exposedPorts:
+            - 1414
+          waitFor:
+            logMessage: '.*AMQ5026I: The listener ''SYSTEM.LISTENER.TCP.1'' 
has started.*'
+
+  # Create Camel JBang integration
+  - camel:
+      cli:
+        run:
+          waitForRunningState: false
+          integration:
+            file: "jms/jms-ibm-mq-source-reply-route.yaml"
+            systemProperties:
+              properties:
+                - name: "http.sink.url"
+                  value: "http://localhost:${http.server.port}";
+                - name: "mq.host"
+                  value: "${CITRUS_TESTCONTAINERS_IBMMQ_HOST}"
+                - name: "mq.port"
+                  value: "${CITRUS_TESTCONTAINERS_IBMMQ_PORT}"
+
+  # Request 1 names a queue to reply to; the flow sets JMSReplyTo and 
CamelJmsDestinationName to another queue
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer goes back to the JMSReplyTo of the request, with the JMSReplyTo 
of the request, not the one the flow set
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(DEV.QUEUE.2)@'
+          body:
+            data: 'answer to request 1'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 2 has no JMSReplyTo; the flow sets the same headers
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 2'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Request 3 names a queue to reply to again, so request 2 is done
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/request"
+          type: "plaintext"
+          body:
+            data: 'request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # The answer to request 3
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/reply"
+          type: "plaintext"
+          headers:
+            - name: "X-Reply-To"
+              value: '@contains(DEV.QUEUE.2)@'
+          body:
+            data: 'answer to request 3'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
+  # Nothing reached the queue named by the headers of the flow
+  - http:
+      server: "httpServer"
+      receiveRequest:
+        POST:
+          path: "/elsewhere"
+          type: "plaintext"
+          body:
+            data: 'nothing'
+  - http:
+      server: "httpServer"
+      sendResponse:
+        response:
+          status: 200
+          reasonPhrase: "OK"
+          version: "HTTP/1.1"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.yaml
new file mode 100644
index 000000000..f4ad144c4
--- /dev/null
+++ 
b/tests/camel-kamelets-itest/src/test/resources/jms/jms-ibm-mq-source-reply-route.yaml
@@ -0,0 +1,100 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+# an application that sends requests and waits for the replies
+- beans:
+    - name: requester
+      type: "com.ibm.mq.jakarta.jms.MQConnectionFactory"
+      properties:
+        XMSC_WMQ_HOST_NAME: '{{mq.host}}'
+        XMSC_WMQ_PORT: '{{mq.port}}'
+        XMSC_WMQ_CHANNEL: 'DEV.APP.SVRCONN'
+        XMSC_WMQ_QUEUE_MANAGER: 'QM1'
+        XMSC_WMQ_CONNECTION_MODE: '1'
+        XMSC_USERID: 'app'
+        XMSC_PASSWORD: 'passw0rd'
+
+- route:
+    from:
+      uri: "kamelet:jms-ibm-mq-source"
+      parameters:
+        serverName: '{{mq.host}}'
+        serverPort: '{{mq.port}}'
+        destinationName: 'DEV.QUEUE.1'
+        queueManager: 'QM1'
+        channel: 'DEV.APP.SVRCONN'
+        username: 'app'
+        password: 'passw0rd'
+      steps:
+        - setProperty:
+            name: request
+            simple: "${body}"
+        - to:
+            uri: "{{http.sink.url}}/request"
+        # headers that name another queue: they must not change where the 
answer goes, nor make one
+        - setHeader:
+            name: JMSReplyTo
+            constant: 'DEV.QUEUE.3'
+        - setHeader:
+            name: CamelJmsDestinationName
+            constant: 'DEV.QUEUE.3'
+        - setBody:
+            simple: 'answer to ${exchangeProperty.request}'
+
+# an application that sends requests: 1 and 3 wait for the answer on the queue 
DEV.QUEUE.2, 2 expects none
+- route:
+    from:
+      uri: "timer:send"
+      parameters:
+        repeatCount: 1
+      steps:
+        - setBody:
+            constant: 'request 1'
+        - to:
+            uri: 
"jms:queue:DEV.QUEUE.1?connectionFactory=#requester&exchangePattern=InOut&replyTo=DEV.QUEUE.2&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'request 2'
+        - to:
+            uri: 
"jms:queue:DEV.QUEUE.1?connectionFactory=#requester&exchangePattern=InOnly"
+        - setBody:
+            constant: 'request 3'
+        - to:
+            uri: 
"jms:queue:DEV.QUEUE.1?connectionFactory=#requester&exchangePattern=InOut&replyTo=DEV.QUEUE.2&requestTimeout=30000"
+        - setHeader:
+            name: X-Reply-To
+            simple: "rt=${header.JMSReplyTo}"
+        - to:
+            uri: "{{http.sink.url}}/reply"
+        # what reached the queue named by the headers of the flow
+        - removeHeaders:
+            pattern: '*'
+        - setBody:
+            constant: 'nothing'
+        - pollEnrich:
+            constant: "jms:queue:DEV.QUEUE.3?connectionFactory=#requester"
+            timeout: 3000
+        - setBody:
+            simple: "${body} ?: 'nothing'"
+        - to:
+            uri: "{{http.sink.url}}/elsewhere"

Reply via email to