# Adding retry logic to java high level rest client

**URL:** <https://discuss.elastic.co/t/adding-retry-logic-to-java-high-level-rest-client/278950>\
**Category:** Elasticsearch\
**Created:** [July 16, 2021, 11:51pm UTC](https://discuss.elastic.co/t/adding-retry-logic-to-java-high-level-rest-client/278950 "2021-07-16T23:51:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivasan\_Ramaswamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srinivasan_ramaswamy/32/74106_2.png) [@Srinivasan\_Ramaswamy](https://discuss.elastic.co/u/Srinivasan_Ramaswamy)\
**Post date:** [July 16, 2021, 11:51pm UTC](https://discuss.elastic.co/t/adding-retry-logic-to-java-high-level-rest-client/278950/1 "2021-07-16T23:51:05Z")

</div>

As requests over http can fail for various reasons, would it make sense to add some retry mechanism to high level rest client ?

I see this : [Retry Lifecycle Policy API | Java REST Client [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.13/java-rest-high-ilm-ilm-retry-lifecycle-policy.html). Not sure about the real purpose of this as its operating on an index.

I can add the retry logic in the calling code, but wanted to post this question here as it should be a pretty common requirement for everyone.

---

<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:** [August 13, 2021, 11:52pm UTC](https://discuss.elastic.co/t/adding-retry-logic-to-java-high-level-rest-client/278950/2 "2021-08-13T23:52:00Z")

</div>

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