I am getting this exception.
I am throwing an exception from my afterBulk method of listener which causes the exception to be caught in catch of BulkRequestHandler
.
catch (Exception e) {
logger.warn(() -> new ParameterizedMessage("Failed to execute bulk request {}.", executionId), e);
listener.afterBulk(executionId, bulkRequest, e);
}
But after that in catch block it again calls afterBulk
and then since my afterBulk again throws the exception it is throwing the exception as well.
Questions:
- As mentioned in the (post)[Request cannot be executed i/o reactor status stopped] we should not throw exceptions in
onFailure()
, does I need to remove the exception being thrown from my afterBulk code as it throws exception inonFailure()
? - What is the reason that it causes subsequent requests to fail as well?
- How to avoid subsequent requests failures does resetting the connection will do that?