This article illustrates how Forum Sentry supports ActiveMQ Failover. Special configuration on the ActiveMQ Server side, such as primary vs. secondary are not included.
The Activemq.xml defines the TCP listener as shown below. This is a simple setup where no other clustering information/parameters are used:
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
The use case details below assume there are two ActiveMQ servers configured as indicated above.
Use Case Steps
The Sentry configuration objects detailed below are included in the attached v8.7 FSG (import password is password). After importing the FSG, update the listener and remote policies to point to your own ActiveMQ instances.
- ActiveMQ listener where the connection URI is set to the two ActiveMQ servers as:
- ActiveMQ remote where the connection URI is set to the two ActiveMQ servers as:
- Test policy that submits messages via emote policy above (#2)
4. XML policy that consumes messages using listener above (#1)
This configuration utilizes the Test policy to send messages to ActiveMQ directly via the remote policy. The messages are then consumed using the ActiveMQ listener policy which in turns forwards the messages via HTTP to a loopback service policy.
- Run the test policy a few times and then check the ActiveMQ servers. You should see all messages going to 1 server:
- Stop ActiveMQ on the server receiving all messages and see that message will now all go to the other server: