Hi Chetan, This is currently not possible. The main reason being the definition of the discovery API stating that a 'leader is stable' - ie that it retain leader status unless it crashes. If you now fiddle with the leader election you can create a situation where a leader gets informed that it lost leader status. I'm unsure if all TopologyEventListeners can cope with that.
Having said that, this could be built into discovery of course at [0]: the leader is defined as the one with the lowest 'leaderElectionId' - and that one is set basically to the instance startup time. And that could be modified to contain something configurable as a prefix. Cheers, Stefan -- [0] - https://github.com/apache/sling/blob/528d9de30bfd134c0c5081ed09c2de4f8a9b20 bf/bundles/extensions/discovery/oak/src/main/java/org/apache/sling/discover y/oak/pinger/OakViewChecker.java#L290 On 22/09/16 08:09, "Chetan Mehrotra" <[email protected]> wrote: >I have a hetrogeneous cluster deployment consisting of different type >of Sling instance. Of this some of the Sling instance play worker role >and connect to same repository. > >Would it be possible to have a config where such cluster members do >not participate in leader election and hence do not become candidate >for running cluster singleton jobs > >Chetan Mehrotra
