# What the different between ClusterStateTaskListener and AckedClusterStateTaskListener

**URL:** <https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719>\
**Category:** Elasticsearch\
**Created:** [April 11, 2023, 8:35am UTC](https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719 "2023-04-11T08:35:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cm\_z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cm_z/32/119671_2.png) [@cm\_z](https://discuss.elastic.co/u/cm_z)\
**Post date:** [April 11, 2023, 8:35am UTC](https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719/1 "2023-04-11T08:35:05Z")

</div>

what the different between ClusterStateTaskListener.clusterStateProcessed and AckedClusterStateTaskListener.onAllNodesAcked , they all call after elasticsearch publish finish.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 11, 2023, 9:53am UTC](https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719/2 "2023-04-11T09:53:18Z")

</div>

`AckedClusterStateTaskListener.onAllNodesAcked` (or `org.elasticsearch.cluster.ClusterStateAckListener#onAllNodesAcked` in recent versions) is only called when all nodes have successfully acked the state. Otherwise `onAckFailure` is called. And acking has a different timeout from publication so this might happen before, or after, the end of the publication.

---

<div class="post-metadata">

**Author:** ![cm\_z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cm_z/32/119671_2.png) [@cm\_z](https://discuss.elastic.co/u/cm_z)\
**Post date:** [April 11, 2023, 10:05am UTC](https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719/3 "2023-04-11T10:05:25Z")

</div>

I still don't know what the difference is between the two call points in my problem, because their call timing does occur after all nodes respond to ack

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 9, 2023, 10:12am UTC](https://discuss.elastic.co/t/what-the-different-between-clusterstatetasklistener-and-ackedclusterstatetasklistener/329719/5 "2023-05-09T10:12:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
