Introduction
The current terminology used by the broker mixes functional topics and has been flagged as problematic language.
Currently the term 'master' is overloaded to describe:
- If a broker is active.
- If a data store is active.
- Stale code identifying a broker as a master in a master-master replication scenario.
Updating the terminology to separate technical capabilities, while addressing problematic language will help ActiveMQ users have clearer understanding and setup for future replication capabilities
Proposal
-
Simple single flag if a broker is online to receive messaging traffic
a. transport connectors online
b. data store available for storing messages
-
Delegate message store status to the messages store implementation.
a. Example, a database is offline, the JDBCPersistenceAdapter could signal a failure vs simple not obtaining the lock. Currently, both these concepts are combined to put the broker into 'slave' mode
b. Example, kahadb lock obtain NFS lock vs failure to write to local disk kicking of the IOExceptionHandler both put broker in 'slave' mode.
Broker active
- Simple metric (active=true) at the broker level that signals if the broker is active (transport connectors online, datastore available).
- This replaces and deprecates the 'slave' flag.
- Broker starts up, active=false. Once datastore is available, broker may move active=true.
- Administratively, a broker may receive a command to go 'offline' to stop transport connectors and stop the data store from processing messages
Message Store status
- Each message store may provide their own flags
- Some flags may be inherited when it makes sense for the data store technology -- Example: active=true|false, mode=primary|failover may be shared by the JDBC and KahaDB stores.
- Future data stores can provide more details for replication suc h as leader, follower, replication status, etc.
Implementation approach
- Add a new flag to the broker and datastore
- Mark broker's 'slave' flag as deprecated
- Add new non-impacting technical (JMX, web console, etc) user facing labels using 'master' and 'slave' to 'Active' is True or False. Old fields remain and get marked as @deprecated for removal. In the case of a webpage, a redirect may be added (ex: slave.jsp -> inactive.jsp)
Introduction
The current terminology used by the broker mixes functional topics and has been flagged as problematic language.
Currently the term 'master' is overloaded to describe:
Updating the terminology to separate technical capabilities, while addressing problematic language will help ActiveMQ users have clearer understanding and setup for future replication capabilities
Proposal
Simple single flag if a broker is online to receive messaging traffic
a. transport connectors online
b. data store available for storing messages
Delegate message store status to the messages store implementation.
a. Example, a database is offline, the JDBCPersistenceAdapter could signal a failure vs simple not obtaining the lock. Currently, both these concepts are combined to put the broker into 'slave' mode
b. Example, kahadb lock obtain NFS lock vs failure to write to local disk kicking of the IOExceptionHandler both put broker in 'slave' mode.
Broker active
Message Store status
Implementation approach