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

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

Open in new window

Jayabharath sadanagiriSoftware SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Radek BaranowskiFull-stack Java DeveloperCommented:

in they have suggested using


Open in new window

approach, did you try that ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jayabharath sadanagiriSoftware SpecialistAuthor Commented:
Yes, lease-database-locker with jDBCIOExceptionHandler resolved the issue.
Jayabharath sadanagiriSoftware SpecialistAuthor Commented:
I see a new issue after implementing lease-database-locker.
Issue: with new configurations, messages are piling up when we switch ActiveMQ nodes.
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 BaranowskiFull-stack Java DeveloperCommented:
I suggest you close this question and open a new one for the sake of clarity.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.