markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

feat: add send timeout if server is not available #184

Open Grentry opened 3 months ago

Grentry commented 3 months ago

If the elastic server ist not available every request blocks execution. Now if the server is not reachable the events get saved in a queue and sent with the next request but with a defined timeout. As long the timeout has not exeeded the target do not try to send the request to the server.

I added two new properties MaxQueueItems: limits the max items in queue. Default 1000 SendTimeoutOnFailureInMilliseconds: sets the timeout . Default 10000

I had the problem described in https://github.com/markmcdowell/NLog.Targets.ElasticSearch/issues/174