My configuration is the following
java app => log4j2 SocketAppender (tcp) => Logstash: tcp input, es output => elasticsearch
Elasticsearch cluster is red and do not accept indexing by some reason.
Logstash infinitely retries to index log into elasticsearch. Log4j2 waits for it and the java app simply hangs.
Logstash should retry, say, 5 times and then just reply to log4j2 with error somehow. Log4j2 throws an error => it can be logged in file and further investigated.
Is there an option to limit retry count for es output plugin?