Hello Justin, I`m sorry for the wrong mailing list. Should i close this and re-open in the correct one?
I put a small demo for the issue here: https://github.com/MaximilianRieder/ArtemisOpenwireTempQueueIssue Kind regards Maximilian Von: "Justin Bertram" <jbert...@apache.org> An: dev@activemq.apache.org Datum: 02/14/2025 07:05 PM Betreff: [Ext] Re: Artemis Openwire temporary queue issue Do you have a test-case you can share (e.g. via GitHub)? Something I can just grab and run to reproduce the problem would be ideal, but even just the bare code involved would be better than nothing. Also, in the future please direct questions like this to the ActiveMQ users list (i.e. us...@activemq.apache.org). This list (i.e. the dev list) is meant for folks who are working directly on an ActiveMQ code-base. Justin On Fri, Feb 14, 2025 at 9:25?AM <maximilian.rie...@systema.com> wrote: > Hello community, > > we encountered a problem with temporary Queues when using Openwire with > Artemis. > > Situation: > We want to use an Artemis broker with Applications communicating over > Openwire with JMS. > Specifically, we want to perform request reply using the reply-to field > and temporary queues. > For the broker we have an Artemis broker (Version 2.37). > The clients use the ActiveMQ classic client libraries. > For the reply we create a temporary queue with: > org.apache.activemq.ActiveMQSession.createTemporaryQueue() > > First scenario: Temp queues working in same JVM: > We have a unit test where we send the request on a queue ("request-queue") > on the broker and create the temporary queue beforehand as described, to > receive the reply. > In the Unit test we also subscribe to that "request-queue" and if a > message is received we send a reply to the temporary queue (specified in > the JMS-reply-to field). > That works as we would expect and the reply is received on the temporary > queue. > > Second scenario: Temp queues not working in different JVMs: > Now for the part where we encounter the error. > We set up the same scenario as in one, but not in a unit test but with two > different applications. > So one application with the activeMQ classic libraries that sets a > temporary queue, set the JMS-reply-to to that queue and send the message to > a queue ("request-queue") on the broker. > The second application subscribes to that "request-queue" and receives the > message. > We extract the temporary reply queue with Destination replyDestination = > msg.getJMSReplyTo(); > But when we want to send the message we encounter the following error: > > javax.jms.InvalidDestinationException: Cannot publish to a deleted > Destination: temp-queue://ID:NTNB794-64640-1739355767427-5:1:1 > at > org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1841) > at > org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289) > at > org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224) > at > de.systemagmbh.components.bus.activemq.CSysAMQServiceRunnerCallback.sendReply(CSysAMQServiceRunnerCallback.java) > at > de.systemagmbh.tools.bus.CSysServiceRunner.run(CSysServiceRunner.java) > at > de.systemagmbh.tools.bus.ASysServiceRunnerCallback.startServiceRunner(ASysServiceRunnerCallback.java) > at > de.systemagmbh.components.bus.activemq.CSysAMQServiceRunnerCallback.<init>(CSysAMQServiceRunnerCallback.java) > at > de.systemagmbh.components.bus.activemq.CSysAMQServiceSubjectDriver.onMessage(CSysAMQServiceSubjectDriver.java) > at > org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1390) > at > org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131) > at > org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202) > at > org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) > at > org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) > at java.base/java.lang.Thread.run(Thread.java:1583) > > Have any of you encountered something similar or knows if we do something > wrong? > > Kind regards Maximilian > ------------------------------ > > *Maximilian Rieder* > Software Engineer > > Phone: +49 941 / 7 83 92 84 > maximilian.rie...@systema.com > > www.systema.com > > [image: LinkedIn] <https://www.linkedin.com/company/systema-gmbh/ >[image: > Facebook] <https://de-de.facebook.com/SYSTEMA.automation/>[image: XING] > <https://www.xing.com/pages/systemagmbh> > > SYSTEMA > Systementwicklung Dipl.-Inf. Manfred Austen GmbH > > Manfred-von-Ardenne-Ring 6 | 01099 Dresden > HRB 11256 Amtsgericht Dresden | USt.-ID DE 159 607 786 > Geschäftsführer: Manfred Austen, CEO und Dr. Ulf Martin, COO > > P Please check whether a printout of this e-mail is really necessary. >