It locks a file to ensure that only the broker holding the lock (the master) is granted access to the message store. The Shared File Locker is the default locker for the KahaDB persistence adapter. The duration (in milliseconds) to keep the lock alive, when greater than 0. Intended primarily for use during development to temporarily disable the use of the locker without having to remove its configuration. Should the persistence adapter use the configured locker. This interface has the following properties: Property Name When true slave brokers will not start.Įvery persistence adapter (or any other broker service that wishes to use locks) must implement the Lockable interface. Should the broker start fail if the lock is not immediately available. The polling interval (in milliseconds) between lock acquire attempts. The locker interface has the following properties: Property Name LockersĮvery locker must implement the Locker interface. This interface makes it easy to implement a custom storage locker that meets local requirements.Įvery persistence adapter, however, has its own default locker which works as before. Storage locker pluggability is made possible by the Locker interface that all pluggable lockers must implement. Now that the choice of storage locker is divorced from that of the persistence adapter one can mix and match combinations of the two. Similarly, the JDBC persistence adapter used a database backed storage lock. With the KahaDB persistence adapter, for example, the storage locking mechanism was based on a shared file lock. Prior to release 5.7.0 the storage locking mechanism (and thus master election) was dictated by the choice of persistence adapter. This feature is only meaningful to brokers configured in a shared storage master/slave topology. Features > Persistence > Pluggable storage lockersĪs of the 5.7.0 release of ActiveMQ the choice of storage locking mechanism, as used by a persistence adapter, has been made pluggable.
0 Comments
Leave a Reply. |