0
votes

I have an Spring Boot app whose different parts connected via JMS. I use external ActiveMQ Artemis (in different docker container).

When I run the Spring Boot app via gradle bootRun all works perfectly - messages are delivered without loss.

But when I run app in Wildfly not all messages are delivered. Some messages are lost (about half). I configure external message broker use in Wildfly with pooled connection factory and execute commands for creating the outbound-socket-binding, remote-connector, & pooled-connection-factory.

In logs of Wildfly I get tons of:

2020-05-24 20:52:28,508 DEBUG [org.apache.activemq.artemis.service.extensions.xa.recovery] (Periodic Recovery) looking for recover at ClientSessionImpl [name=44c73a79-9dff-11ea-8d1c-0242ac110004, username=null, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@2af3f7bd, metaData=()]@410fad2f configuration [XARecoveryConfig [transportConfiguration=[TransportConfiguration(name=, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?port=61616&localAddress=0-0-0-0&host=my-host], discoveryConfiguration=null, username=null, password=****, JNDI_NAME=java:/jms/remoteArtemisJms]]

And in ActiveMQ logs permanently appears:

2020-05-24 21:16:18,063 DEBUG [org.apache.activemq.artemis.core.server.impl.QueueImpl] QueueImpl[name=30b977b0-ac39-431e-9957-2a9ac1f8b64f, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=0b678ade-9de8-11ea-9475-0242ac110002], temp=true]@3a205718 adding consumer ServerConsumerImpl [id=1860, filter=null, binding=LocalQueueBinding [address=jms.topic.tasks, queue=QueueImpl[name=30b977b0-ac39-431e-9957-2a9ac1f8b64f, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=0b678ade-9de8-11ea-9475-0242ac110002], temp=true]@3a205718, filter=null, name=30b977b0-ac39-431e-9957-2a9ac1f8b64f, clusterName=30b977b0-ac39-431e-9957-2a9ac1f8b64f0b678ade-9de8-11ea-9475-0242ac110002]]

for every queue or topic. Looks like permanently reconnection.

And ActiveMQ Management console blinking when I start Wildfly app (and icons became gray in left menu). When I stop app, blinking in Management console stops, menu items are green.

So, questions:

  1. How I can troubleshoot and fix messaging issue in Wildfly (permanently reconnection)?
  2. What is periodic recovery? Why it occurs?
  3. What means green and gray icons in ActiveMQ management console? And why it is blinking and how to fix it?
1

1 Answers

0
votes

So, seems it was configuration issue. What I do:

  1. Change spring activemq starter to artemis
  2. Create different connection factories to queues and topics
  3. Create different DefaultMessageListenerContainer for different topics and queues using connection factories from p.2

Now all works fine.