Avatar of Jayabharath sadanagiri
Jayabharath sadanagiri
 asked on

Active MQ 5.13.1 Slave node is getting stopped when database switch happens

I am using Active MQ 5.13.1 and Master/Slave Active MQ topology configured.
Slave node is getting stopped when database switch happens.

<-- Wrapper Stopped

Tried following auto reconnect configuration, from activemq.xml but no luck

     <persistenceAdapter>
                   			
    			<jdbcPersistenceAdapter dataDirectory="activemq-data" dataSource="#mssql-ds" lockKeepAlivePeriod="5000" > 
    				<locker>
    					<database-locker lockAcquireSleepInterval="30000" />
    				</locker>
    			</jdbcPersistenceAdapter>
    		</persistenceAdapter>

Open in new window

* Apache ActiveMQJava App Servers

Avatar of undefined
Last Comment
Jayabharath sadanagiri

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Radek Baranowski

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jayabharath sadanagiri

ASKER
Yes, lease-database-locker with jDBCIOExceptionHandler resolved the issue.
Jayabharath sadanagiri

ASKER
I see a new issue after implementing lease-database-locker.
Issue: with new configurations, messages are piling up when we switch ActiveMQ nodes.
observations:
1. messages are getting accumulated in one particular queue only and dispatched queue section has pending messages.
2. not observed issues with other queues
3. tried with queuePrefetch = 1, but still observed pending messages in dispatch queue. Consumers were not processing msgs.
Radek Baranowski

I suggest you close this question and open a new one for the sake of clarity.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Jayabharath sadanagiri

ASKER