You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Tony Lewis <tl...@securelogix.com> on 2024/06/13 14:09:17 UTC
Shared Durable Subscription Problem.
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.
Re: Shared Durable Subscription Problem.
Posted by Justin Bertram <jb...@apache.org>.
What value did you set for "multicastPrefix" on the acceptor in broker.xml?
Justin
On Fri, Jun 14, 2024 at 11:08 AM Tony Lewis <tl...@securelogix.com> wrote:
> 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 <cl...@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
> users@activemq.apache.org though. Also you didn't provide mu
> *Caution!* This message is potentially suspicious.
> (From: clebert.suconic@gmail.com, External)
> *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 users@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 <tl...@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-unsubscribe@activemq.apache.org
>
> For additional commands, e-mail: dev-help@activemq.apache.org
>
> For further information, visit: https://activemq.apache.org/contact
> <https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
>
>
>
Re: Shared Durable Subscription Problem.
Posted by Tony Lewis <tl...@securelogix.com>.
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 <cl...@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 users@activemq.apache.org though. Also you didn't provide mu
[cid:inky-injection-inliner-03755809cc10337ec572b1f12a6beedf]
Caution! This message is potentially suspicious.
(From: clebert.suconic@gmail.com<ma...@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 users@activemq.apache.org<ma...@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 <tl...@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-unsubscribe@activemq.apache.org<ma...@activemq.apache.org>
For additional commands, e-mail: dev-help@activemq.apache.org<ma...@activemq.apache.org>
For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
Re: Shared Durable Subscription Problem.
Posted by Tony Lewis <tl...@securelogix.com>.
That did it. The configuration item "enable-amq1-prefix" was the clincher. Thank you so very much, Emmanuel.
________________________________
From: Emmanuel Hugonnet <eh...@redhat.com>
Sent: Friday, June 14, 2024 11:38:55 AM
To: dev@activemq.apache.org
Subject: Re: Shared Durable Subscription Problem.
Also there is this doc page [1] and this quickstart [2] that describes such things
Emmanuel
[1]: https://docs.wildfly.org/32/Admin_Guide.html#Messaging_Connect_a_pooled-connection-factory_to_a_Remote_Artemis_Server<https://url.emailprotection.link/?bDtQddgXHEwYYKW7VDLsgue1SPatX1lJezidVb_BNT5Fo1j-e3-x-OcMFfVHcn00bHPVcNB4j3rc41mclL5gWYynAOBNkLEgkwMVNkgWbzQ5bMJAAaJkA6YI_acsne0Wld2w74cFvnSEbcY5QmhnDuN1oWy4IrPnRVITM1XnaReQ~>
[2]: https://github.com/wildfly/quickstart/tree/main/remote-helloworld-mdb<https://url.emailprotection.link/?beieqbTVb6mGAsRJrxOXs997gsTB4pxaxWdO3Q7vm6lY-iCOfq4bmuhItGNZijoPDS7c9F6N5f6kR4iU9HdSR0Nrw50dSoBFKCykR3RKrcMql4wV4ihHyYA54Oozp1KXc>
Le 14/06/2024 à 18:16, Emmanuel Hugonnet a écrit :
> You can configure that attribute in WildFly using the external resources that are designed to connect to a remote Artemis.
> Please note that for compatibility reasons WildFly still use the legacy prefix internally for its embedded broker.
> https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/pooled-connection-factory/index.html#attr-enable-amq1-prefix<https://url.emailprotection.link/?bMBb09_X2aZapSnfjxpWMmPMPL9N8JFOuL8-6GFADKC5GE4_42TcAmy41dDcAj6aZS1yMqfq2-NJV9FcA7lHTxJm7SJFlCCh_CCa1SKS3nJEic9yZoC4y03hx82_eDWdfkaMwIRrgwwmk4ZiGS2F_QwBIH1gOTt-_uv91m_iFHsE~>
> https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/connection-factory/index.html#attr-enable-amq1-prefix<https://url.emailprotection.link/?bl-Ey5Xjywqa4fpixSmnba59O8OlNQDESzBvI3_TgsQauhi8FtwJDYfnQ3_LtMftKDddAXIErobW44cFsAHzg3nXAHOE4l86VjHwW8k2_mQ4Ao6yHukwGspAoxH3jDL7EMAD4ruK9Mu3NyxXsZzkGgHQMVdVgIcRJxQNb49HB1Fs~>
>
> Emmanuel
>
>
>
> Le 14/06/2024 à 17:58, Tony Lewis a écrit :
>>
>> The issue is with enable1xPrefix.
>>
>> I have created the relevant org.apache.activemq.artemis.api.jms.ActiveMQJMSClient.properties<https://url.emailprotection.link/?bUGCM-hAlpVwIawCCsUje_PqbM2lvKBaWjV6BaiOBw9bkkuhRG_6nf5_whTtP66bMva5_PgmGDd9btRHmgbrFo-dhdT_KUjNkp6Gnj2qsY9s1X-MVvK4uwIo4HOVxxmBW> 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<https://url.emailprotection.link/?b0VgOOyhRITNhxZXLX4iy53UCa9VoyKHc9ZGVlc6yv4shihAi90JsFBXbOkXadyGQKF5nv-4zkWdIpe9WwqQPthDdBJqj-xsaNruE8EPOoJ8MhaoWV9Hkv7F6UK-lhyi2> 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<ma...@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 IDand everything works as expected.
>>
>> So, I'm guessing it is going to be a Wildfly issue.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Clebert Suconic <cl...@gmail.com>>
>> *Sent:* Thursday, June 13, 2024 11:16:06 AM
>> *To:* dev@activemq.apache.org<ma...@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 users@activemq.apache.org<ma...@activemq.apache.org> though. Also you didn't provide mu
>>
>> *Caution!* This message is potentially suspicious.
>> (From: clebert.suconic@gmail.com<ma...@gmail.com> <ma...@gmail.com>>, External)
>>
>>
>>
>> *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 users@activemq.apache.org<ma...@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 <tl...@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-unsubscribe@activemq.apache.org<ma...@activemq.apache.org>
>>
>> For additional commands, e-mail: dev-help@activemq.apache.org<ma...@activemq.apache.org>
>>
>> For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
>> <https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@activemq.apache.org<ma...@activemq.apache.org>
For additional commands, e-mail: dev-help@activemq.apache.org<ma...@activemq.apache.org>
For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
Re: Shared Durable Subscription Problem.
Posted by Emmanuel Hugonnet <eh...@redhat.com>.
Also there is this doc page [1] and this quickstart [2] that describes such things
Emmanuel
[1]: https://docs.wildfly.org/32/Admin_Guide.html#Messaging_Connect_a_pooled-connection-factory_to_a_Remote_Artemis_Server
[2]: https://github.com/wildfly/quickstart/tree/main/remote-helloworld-mdb
Le 14/06/2024 à 18:16, Emmanuel Hugonnet a écrit :
> You can configure that attribute in WildFly using the external resources that are designed to connect to a remote Artemis.
> Please note that for compatibility reasons WildFly still use the legacy prefix internally for its embedded broker.
> https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/pooled-connection-factory/index.html#attr-enable-amq1-prefix
> https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/connection-factory/index.html#attr-enable-amq1-prefix
>
> Emmanuel
>
>
>
> Le 14/06/2024 à 17:58, Tony Lewis a écrit :
>>
>> 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 IDand everything works as expected.
>>
>> So, I'm guessing it is going to be a Wildfly issue.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Clebert Suconic <cl...@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 users@activemq.apache.org though. Also you didn't provide mu
>>
>> *Caution!* This message is potentially suspicious.
>> (From: clebert.suconic@gmail.com <ma...@gmail.com>, External)
>>
>>
>>
>> *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 users@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 <tl...@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-unsubscribe@activemq.apache.org
>>
>> For additional commands, e-mail: dev-help@activemq.apache.org
>>
>> For further information, visit: https://activemq.apache.org/contact
>> <https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@activemq.apache.org
For additional commands, e-mail: dev-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: Shared Durable Subscription Problem.
Posted by Emmanuel Hugonnet <eh...@redhat.com>.
You can configure that attribute in WildFly using the external resources that are designed to connect to a remote Artemis.
Please note that for compatibility reasons WildFly still use the legacy prefix internally for its embedded broker.
https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/pooled-connection-factory/index.html#attr-enable-amq1-prefix
https://docs.wildfly.org/26/wildscribe/subsystem/messaging-activemq/connection-factory/index.html#attr-enable-amq1-prefix
Emmanuel
Le 14/06/2024 à 17:58, Tony Lewis a écrit :
>
> 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 IDand everything works as expected.
>
> So, I'm guessing it is going to be a Wildfly issue.
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Clebert Suconic <cl...@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 users@activemq.apache.org though. Also you didn't provide mu
>
> *Caution!* This message is potentially suspicious.
> (From: clebert.suconic@gmail.com <ma...@gmail.com>, External)
>
>
>
> *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 users@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 <tl...@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-unsubscribe@activemq.apache.org
>
> For additional commands, e-mail: dev-help@activemq.apache.org
>
> For further information, visit: https://activemq.apache.org/contact
> <https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@activemq.apache.org
For additional commands, e-mail: dev-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: Shared Durable Subscription Problem.
Posted by Tony Lewis <tl...@securelogix.com>.
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 <cl...@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 users@activemq.apache.org though. Also you didn't provide mu
[cid:inky-injection-inliner-03755809cc10337ec572b1f12a6beedf]
Caution! This message is potentially suspicious.
(From: clebert.suconic@gmail.com<ma...@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 users@activemq.apache.org<ma...@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 <tl...@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-unsubscribe@activemq.apache.org<ma...@activemq.apache.org>
For additional commands, e-mail: dev-help@activemq.apache.org<ma...@activemq.apache.org>
For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
Re: Shared Durable Subscription Problem.
Posted by Tony Lewis <tl...@securelogix.com>.
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 <cl...@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 users@activemq.apache.org though. Also you didn't provide mu
[cid:inky-injection-inliner-03755809cc10337ec572b1f12a6beedf]
Caution! This message is potentially suspicious.
(From: clebert.suconic@gmail.com<ma...@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 users@activemq.apache.org<ma...@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 <tl...@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-unsubscribe@activemq.apache.org<ma...@activemq.apache.org>
For additional commands, e-mail: dev-help@activemq.apache.org<ma...@activemq.apache.org>
For further information, visit: https://activemq.apache.org/contact<https://url.emailprotection.link/?bbhUssy9NPhVM3wTEVsgO7vdLNiutZIlBM-S5lvxolU4i89891M_a2F_txMMVj2H6L4SAOMGhiVSSlyeYmksYygCncUDLBRw5IM7ZWHs892s9wlAV-jePNCUyJdsxZ2iO>
Re: Shared Durable Subscription Problem.
Posted by Clebert Suconic <cl...@gmail.com>.
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 users@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 <tl...@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-unsubscribe@activemq.apache.org
For additional commands, e-mail: dev-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact