[ 
https://issues.apache.org/jira/browse/SLING-12639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921682#comment-17921682
 ] 

Timothee Maret commented on SLING-12639:
----------------------------------------

We should leverage the Sling Discovery API to implement this. The 
DistributionSubscriber would implement TopologyEventListener to register and 
unregister the service for leader respectively follower instances as the 
topology changes.

Today activate and deactivate method bodies would move to new methods e.g. 
register and unregister and those new methods will be invoked from the 
handleTopologyEvent method implementation.

More documentation @ 
https://sling.apache.org/documentation/bundles/discovery-api-and-impl.html

> Enable Cluster Awareness for DistributionSubscriber
> ---------------------------------------------------
>
>                 Key: SLING-12639
>                 URL: https://issues.apache.org/jira/browse/SLING-12639
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>    Affects Versions: Content Distribution Journal Core 0.4.0
>            Reporter: Timothee Maret
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.6.0
>
>
> DistributionSubscriber is a service that needs to run only once per cluster. 
> The issue is not relevant when deploying the service on a farm of publish 
> instances. To run the service on an author cluster, we need to ensure the 
> service only runs on the leader.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to