Hi Christian, Instead of `.toD`, try using a single `jms` endpoint and control the destination using headers. Relevant documentation here: https://camel.apache.org/components/4.4.x/jms-component.html#_reuse_endpoint_and_send_to_different_destinations_computed_at_runtime interceptSendToEndpoint("jms*") .log("intercepted jms send!") .to("jms:otherQueue"); from("direct:my-route-id") .routeId("my-route-id") .setHeader("myheader", constant("targetQueue")) .setHeader("CamelJmsDestinationName", simple("${headers.myheader}")) .to("jms:dummy"); (not tested!) Intercepting all exchanges to `jms*` and then sending them to a `jms` endpoint may also be causing the issue. Perhaps add a filter to only send the exchange if the "CamelJmsDestinationName" is not "otherqueue"? Regards, Diogo Costa "MÜLLER Christian (ICS460-BAI)" christian.muel...@spar-ics.com.invalid – 22 February 2024 14:17
> Nobody that can support us here? More information needed? We are stuck > here and would really appreciate any hint Thanks Christian > > > > Am 20.02.24, 17:42 schrieb "MÜLLER Christian (ICS460-BAI)" > <christian.muel...@spar-ics.com.INVALID>: > > > > Hi, Given the following setup: interceptSendToEndpoint("jms*") > .log("intercepted jms send!") > .to("jms:otherQueue"); from("direct:my-route-id") > .routeId("my-route-id") > .setHeader("myheader",constant("targetQueue")) > .toD("jms:${headers.myheader}"); > > Expected one message sent to “targetQueue” and one sent to “otherQueue” > > Actual: one message sent to “targetQueue” and one message sent to > “${headers.myheader}”AMQ601500: User anonymous@127.0.0.1:63319 is > sending a message > CoreMessage[messageID=9,durable=true,userID=cabc1571-d00d-11ee-b7da-becf4cf7ea1d,priority=4, timestamp=Tue Feb 20 17:33:34 CET 2024,expiration=0, durable=true, address=targetQueue,size=4611,properties=TypedProperties[dataFormat=xml,__AMQ_CID=cab1670d-d00d-11ee-b7da-becf4cf7ea1d,breadcrumbId=55686e49-01f1-42ea-8cbb-0125f898c6ce,CamelCharsetName=utf-8,_AMQ_ROUTING_TYPE=1,CamelInterceptedEndpoint=jms://$%7Bheaders.myheader%7D,myheader=targetQueue,EaiImageTid=3683380,CamelFileRelativePath=TestCase1.body,ignoreElements=transaction_date;transaction_time,ImageDistributionKey=HS]]@175631139, with Context: RoutingContextImpl(Address=null, routingType=null, PreviousAddress=null previousRoute:null, reusable=null, version=0)AMQ601500: User anonymous@127.0.0.1:63320 is sending a message CoreMessage[messageID=22,durable=true,userID=cac08247-d00d-11ee-b7da-becf4cf7ea1d,priority=4, timestamp=Tue Feb 20 17:33:34 CET 2024,expiration=0, durable=true, address=${headers.myheader},size=4627,properties=TypedProperties[dataFormat=xml,__AMQ_CID=cabf70d3-d00d-11ee-b7da-becf4cf7ea1d,breadcrumbId=55686e49-01f1-42ea-8cbb-0125f898c6ce,CamelCharsetName=utf-8,_AMQ_ROUTING_TYPE=1,CamelInterceptedEndpoint=jms://$%7Bheaders.myheader%7D,myheader=targetQueue,EaiImageTid=3683380,CamelFileRelativePath=TestCase1.body,ignoreElements=transaction_date;transaction_time,ImageDistributionKey=HS]]@46786045, with Context: RoutingContextImpl(Address=null, routingType=null, PreviousAddress=null previousRoute:null, reusable=null, version=0)Would really appreciate any help here! Regards > Christian > > > > > DI Christian MüllerSoftware EngineerBusiness Automation & Integration > > > > Mobile: > > +43 664 88748100 > > E-Mail: > > christian.muel...@spar-ics.com > > > > SPAR Business Services GmbHInformation & Communication > ServicesEuropastrasse 3, 5015 Salzburg, Austria > > > > > > Sollten Sie diese E-Mail unbeabsichtigt bzw. irrtümlich erhalten haben, > so weisen wir Sie darauf hin, dass gemäß § 161 Abs 4 TKG 2021 der Inhalt > sowie die Tatsache des Empfangs dieser E-Mail weder aufgezeichnet noch > verwertet oder Unbefugten mitgeteilt werden dürfen. Wir ersuchen Sie, > die Nachricht von Ihrem System zu löschen und sich mit uns in Verbindung > zu setzen.Unter diesem Link finden Sie die Informationen über die > Verarbeitung Ihrer personenbezogenen Daten sowie zu Ihren Rechten als > betroffene Person:https://www.spar.at/service/datenschutzhinweiseIf you > have received this email accidentally or in error, we point out that, in > accordance with § 161 para. 4 TKG 2021 (Telecommunications Act), the > contents of this email and the fact of its receipt must not be recorded, > exploited or communicated to unauthorized persons. We ask you to delete > the message from your system and to contact us. Under this link you will > find information about the processing of your personal data and about > your rights as a data > subjecthttps://www.spar.at/service/datenschutzhinweise > > >