hey Ricardo,
You're using the LeaderLatch recipe?

There should be a getLeader() method exposed by the LeaderLatch which you
can use to determine the current leader.
cheers
Cam

On Mon, Oct 27, 2014 at 9:04 AM, Ricardo Ferreira <[email protected]>
wrote:

> Hi,
>
> I'm using the Leader Election recipe to manage leadership among some of my
> nodes.
>
> However, I need to find out the current leader of these nodes from another
> client which is not
> part of the same group.
>
> I haven't found anything on the API to do this. So what's done is to
> instantiate a new LeaderSelector
> and a dummy LeaderSelectorListener that relinquishes leadership as soon as
> it gets it (just in case).
> From this LeaderSelector I can find the ID of the group leader. Then I'll
> query ServiceDiscovery for
> the instance corresponding to this ID.
>
> Is there a simpler (or better) way to this?
>

Reply via email to