Best way to handle "circuit_breaking_exception"


Our micro-service is written in Java.

We are facing the "circuit_breaking_exception" exception occasionally while trying to index documents from multiple threads.
How is the best way to handle it without changing any configuration in the Elasticsearch cluster?

Our idea is to catch the exception and try to index the documents again with a random backoff.
In this way, we won't lose any documents and if there is more than 1 thread that is facing that issue, they will not try to index again at the same time.

What is the best workaround?

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