# I want to get last record saved to Elasticsearch

**URL:** <https://discuss.elastic.co/t/i-want-to-get-last-record-saved-to-elasticsearch/338235>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring, elastic-stack-alerting, ilm-index-lifecycle-management, language-clients\
**Created:** [July 12, 2023, 2:32pm UTC](https://discuss.elastic.co/t/i-want-to-get-last-record-saved-to-elasticsearch/338235 "2023-07-12T14:32:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valerie\_Barbacion](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valerie_barbacion/32/123363_2.png) [@Valerie\_Barbacion](https://discuss.elastic.co/u/Valerie_Barbacion)\
**Post date:** [July 12, 2023, 2:32pm UTC](https://discuss.elastic.co/t/i-want-to-get-last-record-saved-to-elasticsearch/338235/1 "2023-07-12T14:32:51Z")

</div>

Hi Pals, I have a question about throwing request to Elasticsearch. For example given I will going to send a first message to Elasticsearch with has a field value "Sample" and then I send again another message with different value like "NotSample". On this case, I want to get the last message as response witj value "NotSample", is this something retry\_on\_conflict can fix? to avoid experiencing 409 error? I don't think so retry\_on\_conflict is the answer. Does anyone from you all experience this scenario? Thank You for the answers!!!

---

<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 9, 2023, 2:33pm UTC](https://discuss.elastic.co/t/i-want-to-get-last-record-saved-to-elasticsearch/338235/2 "2023-08-09T14:33:01Z")

</div>

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