I can only really speak in regards to Artemis as I'm only familiar with it's internals.
You can implement org.apache.activemq.artemis.core.server.ActivateCallback and pass it to org.apache.activemq.artemis.core.server.ActiveMQServer#registerActivateCallback to be notified of your embedded broker's activation.
----- Original Message -----
From: "preben" <[hidden email]>
To: [hidden email] Sent: Friday, January 13, 2017 2:43:21 PM
Subject: Activemq or Artemis lifecycle events
I'm have a use case where i need simple messaging system embedded in a
spring boot app.
The app. has to be HA, so I want to have 2 instances active for http
Messaging between the instances is setup as master/slave with kahadb and
At the same time there is some logic that can only run on one instance at a
time since it is statefull, calculated, and realtime clock based.
Is there any broker lifecycle events that one can hook into to listen for
broker events. eg. determine which instance becomes master and which slave ?
I was thinking of using such events on app. startup to start the processing
engine on the instance that becomes the master.