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

Jayabharath sadanagiri
Jayabharath sadanagiri used Ask the Experts™
on
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

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Full-stack Java Developer
Commented:
Hello,

in https://issues.apache.org/jira/browse/AMQ-3654 they have suggested using

 
<databaseLocker>
      <lease-database-locker/>
</databaseLocker>

Open in new window


approach, did you try that ?
Jayabharath sadanagiriSoftware Specialist

Author

Commented:
Yes, lease-database-locker with jDBCIOExceptionHandler resolved the issue.
Jayabharath sadanagiriSoftware Specialist

Author

Commented:
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 BaranowskiFull-stack Java Developer

Commented:
I suggest you close this question and open a new one for the sake of clarity.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial