title: JMSReplyTo - How to create a generic camel route for VM/Artemis/IBM MQ
body: <p>I have the following service.</p>
  <ul>
  <li>Spring boot 2.5.13</li>
  <li>Camel 3.18.0</li>
  <li>JMS</li>
  </ul>
  <p>I want to use an embedded ActiveMQ Artemis, standalone ActiveMQ Artemis, and IBM MQ.</p>
  <p>I've managed to get all 3 running and connecting, but one thing I cant figure out is the JMSReplyTo option.</p>
  <p><strong>Running locally with embedded broker:</strong></p>
  <p>This runs fine. I can write a message to the queue and a response is send to the JMSReplyTo:</p>
  <pre class="lang-java prettyprint-override"><code>public void sendRequest(){
      ActiveMQQueue activeMQQueue = new ActiveMQQueue(&quot;RESPONSE_QUEUE&quot;);
      jmsTemplate.convertAndSend(&quot;REQUEST_QUEUE&quot;, &quot;Hello&quot;, pp -&gt; {
          pp.setJMSReplyTo(activeMQQueue);
          return pp;
      });
  }
  </code></pre>
  <p><strong>Via ActiveMQ Artemis console:</strong></p>
  <p>This is where the inconstancy comes as the <code>Object</code> received is an <code>ActiveMQDestination</code> which makes setting the <code>CamelJmsDestination</code> much more involved.</p>
  <p>Am I wasting my time here? Should I just grab the queue name and construct the uri manually? Or I am missing some logic as to how this works? Or maybe I'm not using the Artemis console in the correct way?</p>
  <pre><code>.setExchangePattern(ExchangePattern.InOut)
  .setHeader(&quot;CamelJmsDestination&quot;, header(&quot;JMSReplyTo&quot;))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ljtUN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ljtUN.png" alt="ActiveMQ Artemis Console. Send message" /></a></p>