Fuse MQ Enterprise provides two default lockers that are used based on the type of message store being used:
shared file locker—used by KahaDB and LevelDB stores
database locker—used by the JDBC store
![[Tip]](imagesdb/tip.gif)
Tip Fuse MQ Enterprise also provides a leased database locker that can be in cases where the brokers may periodically lose their connection to the message store.
These default lockers are configurable to optimize their performance.
For further optimization, you can implement your own locker and plug it into the message store. Doing so involves implementing a simple Java interface and adding some configuration to the persistence adapter.
Message store locks are primarily leveraged by the broker for electing masters in master/slave configurations. For more information on master/slave groups see Master/Slave in Fault Tolerant Messaging.
To configure the locker used by a persistence adapter you add a
locker element as a child to the adapter's configuration element
as shown in Example 14.
Example 14. Configuring a Message Store Locker
<persistenceAdapter> <kahaDB directory = "target/activemq-data"> <locker> ... </locker> </kahaDB> </persistenceAdapter>
All locker implementations are required to have the two common configuration properties described in Table 9.
The properties are specified as attributes to the locker's XML configuration element.








