So, my question is, is how to I keep the "enable1xPrefixes" setting of "false" in the org.apache.activemq.artemis.api.jms.ActiveMQJMSClient.propertiesfile to not be overridden when the code runs?
I need it to stay "false" because I am not using these prefixes anywhere, but that is what is causing the failure. I know y'all are busy, so any attention that this garners is very much appreciated. Thank you for your time. ________________________________ From: Tony Lewis Sent: Friday, June 14, 2024 10:58:01 AM To: dev@activemq.apache.org Subject: Re: Shared Durable Subscription Problem. The issue is with enable1xPrefix. I have created the relevant org.apache.activemq.artemis.api.jms.ActiveMQJMSClient.properties file and set this value to false. But it gets overridden when the wildfly server starts up. I have turned "trace" on and I see where setEnable1xPrefix is set to true. I still don't quite know what is causing it so I will keep debugging it. Hopefully somebody may know what this is doing. Crossing my fingers. This is the relevant code in ActiveMQMessageHandler.java that is causing the exception that I have included in this email chain. Around line 145: SimpleString oldTopicName = (enable1XPrefix && !subResponse.getAddress().startsWith(PacketImpl.OLD_TOPIC_PREFIX) ? PacketImpl.OLD_TOPIC_PREFIX : SimpleString.toSimpleString("")).concat(subResponse.getAddress()); boolean topicChanged = !oldTopicName.equals(activation.getAddress()); The topic name changed, so it tries to delete it, but it says there is already a consumer on it. The consumer is NOT one that I have created, as the stack trace shows it is a "LocalQueueBinding", not quite sure what that means yet. So, it fails. The subResponse.getAddress does NOT start with the old prefix, so it tries to add it. I have tried adding the prefix to the topic in there broker.xml.. did not work. I have put the "multicastPrefix" in the acceptors, but that did not work, either. If anybody knows, I would be more than grateful for the solution. Thank you. ________________________________ From: Tony Lewis Sent: Thursday, June 13, 2024 1:08:11 PM To: dev@activemq.apache.org Subject: Re: Shared Durable Subscription Problem. Thank you for your reply and please pardon not including the whole stack. My mistake. Here it is: 2024-06-13 13:30:41,540 WARN [org.apache.activemq.artemis.ra.ActiveMQRALogger] (default-threads - 1) AMQ152005: Failure in broker activation org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter@e45ad389 destination=java:global/remoteContext/flowDataChannel destinationType=javax.jms.Topic ack=Auto-acknowledge durable=true clientID=null subscription=DataProcessor user=null maxSession=15): ActiveMQIllegalStateException[errorType=ILLEGAL_STATE message=AMQ229025: Cannot delete queue DataProcessor on binding DataProcessor - it has consumers = org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding] at org.apache.activemq.artemis@2.19.1//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:549) at org.apache.activemq.artemis@2.19.1//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:443) at org.apache.activemq.artemis@2.19.1//org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.deleteQueue(ActiveMQSessionContext.java:348) at org.apache.activemq.artemis@2.19.1//org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.deleteQueue(ClientSessionImpl.java:766) at org.apache.activemq.artemis.ra@2.19.1//org.apache.activemq.artemis.ra.inflow.ActiveMQMessageHandler.setup(ActiveMQMessageHandler.java:151) at org.apache.activemq.artemis.ra@2.19.1//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setup(ActiveMQActivation.java:317) at org.apache.activemq.artemis.ra@2.19.1//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation$SetupActivation.run(ActiveMQActivation.java:763) at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter$WorkWrapper.run(ActiveMQResourceAdapter.java:160) at org.jboss.ironjacamar.impl@1.5.3.Final//org.jboss.jca.core.workmanager.WorkWrapper.runWork(WorkWrapper.java:445) at org.jboss.as.connector@26.1.3.Final//org.jboss.as.connector.services.workmanager.WildflyWorkWrapper.runWork(WildflyWorkWrapper.java:69) at org.jboss.ironjacamar.impl@1.5.3.Final//org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223) at org.jboss.threads@2.4.0.Final//org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:29) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:789) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:44) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:809) at java.base/java.lang.Thread.run(Thread.java:833) at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513) Then Wildly server is connecting to an external Artemis broker. The Wildfly server is running Artemis modules 2.19.1. The external broker is 2.33. I have been trying to upgrade the Wildfly server to 2.33.0 but now I am getting slf4j class not found errors. So that's another issue. I have just successfully created durable shared subscribers to the 2.33.0 Artemis broker with a little standalone program, non-JEE using the following methods: session.createSharedDurableConsumer((Topic) destination, name) session.createDurableSubscriber((Topic) destination, name)) session.createSharedConsumer((Topic) destination, name) session.createConsumer(destination)); When invoking the "shared" methods, I do not set the connection's client ID and everything works as expected. So, I'm guessing it is going to be a Wildfly issue. ________________________________ From: Clebert Suconic <clebert.suco...@gmail.com> Sent: Thursday, June 13, 2024 11:16:06 AM To: dev@activemq.apache.org Subject: Re: Shared Durable Subscription Problem. something is trying to remove a queue, but it's not allowing it because it had consumers. Post the whole stack trace.. You should have used us...@activemq.apache.org though. Also you didn't provide mu [cid:inky-injection-inliner-03755809cc10337ec572b1f12a6beedf] Caution! This message is potentially suspicious. (From: clebert.suco...@gmail.com<mailto:clebert.suco...@gmail.com>, External) [cid:inky-injection-inliner-24f8f1858928e01e96754081029628ac] First-Time Sender This is the first message you've received from this sender. Be careful when replying or interacting with any attachments or links. something is trying to remove a queue, but it's not allowing it because it had consumers. Post the whole stack trace.. You should have used us...@activemq.apache.org<mailto:us...@activemq.apache.org> though. Also you didn't provide much information about what's happening... I'm providing you an answer based on the little you posted. On Thu, Jun 13, 2024 at 10:09 AM Tony Lewis <tle...@securelogix.com<mailto:tle...@securelogix.com>> wrote: > > I am having a problem with an MDB running on Wildfly 26.1.3. Artemis 2.33. > > > This is the configuration for the MDB: > > > @MessageDriven(activationConfig={ > > @ActivationConfigProperty(propertyName="destinationLookup", > propertyValue="java:global/remoteContext/dataChannel") > > ,@ActivationConfigProperty(propertyName="destinationType", > propertyValue="javax.jms.Topic") > > ,@ActivationConfigProperty(propertyName="subscriptionDurability", > propertyValue ="Durable") > > ,@ActivationConfigProperty(propertyName="subscriptionName", > propertyValue="DataProcessor") > > ,@ActivationConfigProperty(propertyName = "shareSubscriptions", > propertyValue="true") > > > > > And this is the broker.xml for artemis: > > > <address-setting match="dataChannel"> > > <dead-letter-address>DLQ</dead-letter-address> > > <expiry-address>ExpiryQueue</expiry-address> > > <max-delivery-attempts>-1</max-delivery-attempts> > > <redelivery-delay>10000</redelivery-delay> > > <max-redelivery-delay>100000</max-redelivery-delay> > > <redelivery-delay-multiplier>1.5</redelivery-delay-multiplier> > > <!-- with -1 only the global-max-size is in use for limiting --> > > <max-size-bytes>-1</max-size-bytes> > > > <message-counter-history-day-limit>10</message-counter-history-day-limit> > > <address-full-policy>PAGE</address-full-policy> > > <auto-create-queues>true</auto-create-queues> > > <auto-create-addresses>true</auto-create-addresses> > > <auto-create-jms-queues>true</auto-create-jms-queues> > > <auto-create-jms-topics>true</auto-create-jms-topics> > > </address-setting> > > ... > > <address name="dataChannel"> > > <multicast> > > <queue name="DataProcessor" max-consumers="15"> > > <durable>true</durable> > > </queue> > > </multicast> > > </address> > > > > This is the wildfly log on start up: > > ``` > > 2024-06-13 13:31:17,442 ERROR > [org.apache.activemq.artemis.ra.ActiveMQRALogger] (default-threads - 1) > AMQ154003: Unable to reconnect > org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter@e45ad389 > destination=java:global/remoteContext/dataChannel > destinationType=javax.jms.Topic ack=Auto-acknowledge durable=true > clientID=null subscription=DataProcessor user=null maxSession=15): > ActiveMQIllegalStateException[errorType=ILLEGAL_STATE message=AMQ229025: > Cannot delete queue DataProcessor on binding DataProcessor - it has consumers > = org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding] > > ``` > > > This identical code worked in Wildly 18 and Artemis 2.17. > > I have tried just about every combination that I can think of, but I think > I'm at my wit's end. > > If anyone can give me a hand here, I would greatly appreciate it. > > -- Clebert Suconic --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@activemq.apache.org<mailto:dev-unsubscr...@activemq.apache.org> For additional commands, e-mail: dev-h...@activemq.apache.org<mailto:dev-h...@activemq.apache.org> For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>