We want to use SniffingConnectionPool with request retries. We have ThrowExceptions() enabled because we don't want to think abount handling exceptions.
We created test, in which we try to send request to node, that guaranteed to return 500 (NotEnoughMasterException). We expect to make retry to another node. However it fails with exception:
Elasticsearch.Net.PipelineException: Failed sniffing cluster state. --->
System.AggregateException --->
Elasticsearch.Net.PipelineException: An error occurred trying to read the response from the specified node
What are we doing wrong? Can we throw exceptions and make retries together?
NEST does not retry all exceptions; take a look at the failover and retries documentation. Essentially, for HTTP response codes in the range 500-599, the client will retry
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.