How To Integrate Fuse A-MQ With an Oracle RAC
Issue
When a DB failover occurs on the RAC, A-MQ does not failover to the new active DB. It will instead continue to retry to connect to the previous DB, which is now inactive. The problem is that the connections in the DBCP pool are now stale; i.e., they're still pointing to the now inactive DB.
Environment
Here’s the setup:
- A-MQ is configured with JDBC persistence [1].
- In the corresponding DBCP bean’s cfg, the specified target DB address is referred to as the Oracle SCAN address [2].
- So there is a cluster of Oracle DBs running within the RAC, and at any given time, only one is active.
- Connecting to the SCAN address will always take the connecting application (DBCP) to the active DB in the RAC.
[1] http://activemq.apache.org/jdbc-support.html
[2] https://docs.oracle.com/database/121/JJDBC/scan.htm#JJDBC29151
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
