Upgraded from v24 to v26 and our MDBs stopped connecting...

201 views
Skip to first unread message

Aaron Dutenhoefer

unread,
Aug 22, 2022, 2:14:32 PM8/22/22
to WildFly
Hello,  We recently upgraded our development stack from WildFly v24 on JDK 11 to WildFly v26 on JDK 17.  Once we had all our applications running, we discovered that our Message Driven Beans no longer connect to the Artemis instance.  

To verify it wasn't a configuration issue with our Artemis process or a code problem, I temporarily restarted a QA server on WildFly v24 with the exact same deployments, and the consumers/MDBs all connected to the queues and began processing messages.

Our stateless beans using @Inject @JMSConnectionFactory("java:/jmsXA") are working fine and we can publish messages to queues without incident.  Additionally, message driven beans that connect to a topic instead of a queue are also working OK.  It seems only MDBs connecting to a queue with a resource adapter are affected.  

We're using an out-of-process artemis 2.23.1 instance so our standalone.xml config for activeMQ/MDBs is quite brief, we just define a pooled-connection-factory and point it at an outbound-socket-ref to the artemis port.

Here's a sample @MessageDriven configuration showing how we're defining the bean and its configuration

@ResourceAdapter("activemq-ra")
@MessageDriven(name="stTpvRowProcessor", activationConfig = {
@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "tpv.event.assetOpportunity"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "8"), // 8 listener instances per VM to process rows
@ActivationConfigProperty(propertyName = "consumerMaxRate", propertyValue = "100"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")

})

Thanks for any advice you can provide on how to get the MDBs working on WildFly v26.  I'll be happy to provide any additonal confguration from the artemis instance or wildfly as needed. 



Emmanuel Hugonnet

unread,
Aug 23, 2022, 3:43:44 AM8/23/22
to Aaron Dutenhoefer, WildFly
Hello
Could you check that you don't have *jms.queue.*tpv.event.assetOpportunity on your Artemis instance ?
Did you define the anycast.prefix and multicast.prefix on your artemis instance ?
Could you test on current WildFly ? It might also be due to WFLY-16762
Could you put the messaging and artemis log at debug level to see if something is occuring ?
Emmanuel

Le 22/08/2022 à 19:27, Aaron Dutenhoefer a écrit :
> Hello,  We recently upgraded our development stack from WildFly v24 on JDK 11 to WildFly v26 on JDK 17.  Once we had all our applications
> running, we discovered that our Message Driven Beans no longer connect to the Artemis instance.
>
> To verify it wasn't a configuration issue with our Artemis process or a code problem, I temporarily restarted a QA server on WildFly v24
> with the exact same deployments, and the consumers/MDBs all connected to the queues and began processing messages.
>
> Our stateless beans using @Inject @JMSConnectionFactory("java:/jmsXA") are working fine and we can publish messages to queues without
> incident.  Additionally, message driven beans that connect to a *topic *instead of a queue are also working OK.  It seems only MDBs
> connecting to a queue with a resource adapter are affected.
>
> We're using an out-of-process artemis 2.23.1 instance so our standalone.xml config for activeMQ/MDBs is quite brief, we just define a
> pooled-connection-factory and point it at an outbound-socket-ref to the artemis port.
>
> Here's a sample @MessageDriven configuration showing how we're defining the bean and its configuration
>
> @ResourceAdapter("activemq-ra")
> @MessageDriven(name="stTpvRowProcessor", activationConfig = {
> @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
> @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
> @ActivationConfigProperty(propertyName = "destination", propertyValue = "tpv.event.assetOpportunity"),
> @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "8"), // 8 listener instances per VM to process rows
> @ActivationConfigProperty(propertyName = "consumerMaxRate", propertyValue = "100"),
> @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
>
> })
>
> Thanks for any advice you can provide on how to get the MDBs working on WildFly v26.  I'll be happy to provide any additonal confguration
> from the artemis instance or wildfly as needed.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/4cebbc58-e8c8-4571-9807-d5ff928a3f0dn%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/4cebbc58-e8c8-4571-9807-d5ff928a3f0dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Aaron Dutenhoefer

unread,
Sep 1, 2022, 3:12:14 PM9/1/22
to WildFly
Reposting this reply as it appears I didn't succeed the first time:

After some time on PTO I'm working on this problem again.  I've tried the following:
  • Tried running on 27.0.0-Alpha4
    • Abandoned that as the EE8 -> EE10 conversion of our apps was too labor intensive.
  • Tried running on latest v26 branch rebuilt from source
    • Downloaded v26.1.2-SNAPSHOT source from GitHub and built a distribution
    • That failed to solve the issue
  • Raised queue manager and log levels of org.jboss.as.messaging and org.apache.activemq to DEBUG.  
    • Didn't show anything unexpected or unseen on v24

I'm including a 7-z file with the following artifacts that i'm hoping will help in the analysis of this issue:
  • Artemis broker config (broker.xml) 
  • Artemis runtime output (artemis.log) showing DEBUG logs from broker while MDBs are deployed/active
  • WildFly server configuration (standalone-redacted.xml) showing MDB/Resource Adapter setup
  • WildFly logs showing deployment and startup process when applications with MDBs are deployed.

Please let me know if I can provide anything to assist.  If needed I can take the time to build a reproducer utilizing a basic out-of-box Artemis configuration.  We are in the process of upgrading our servers to WildFly v26 from v24 to solve a Kerberos issue but that endeavour is at a standstill due to this MDB issue.

MDB_Issue.logs.7z

Aaron Dutenhoefer

unread,
Sep 2, 2022, 10:16:25 AM9/2/22
to WildFly
I was able to resolve this issue by changing how our MDBs deploy.   Our MDB configuration was somewhat unusual in that we were not using JNDI to look up the queues, instead we were directly instantiating them by setting the useJNDI=false parameter.  The configuration we'd settled on changed organically over the years as we moved from the WildFly embedded broker, to HornetQ, to Artemis 1.x and now Artemis 2.x.  

By definining the connection factories and queues in the <naming> subsystem and looking them up from JNDI, I was able to get our MDBs connected to artemis.  It would appear that somewhere between WildFly v24 and v26, the support for our (admittedly unusual) direct-instantiation approach was lost, at least for queues.  What we're doing still works for topics, although for consistency I went ahead and converted them to JNDI lookups as well.

This issue is resolved for us, just passing along the details so that anyone in a similar situation has access to the info.

Reply all
Reply to author
Forward
0 new messages