Requeue bulk items with response code 429 - Too Many Requests (#803)
Requeue bulk items with response code 429 - Too Many Requests (#803)

When Elasticsearch gets overloaded it may return response code 429
for line items in the bulk response that it could not process.  This
commit detects that response code and requeues the line item so that it
is not dropped.

For reference see the code in the elastic beats elasticsearch
output plugin.

https://github.com/elastic/beats/blob/master/libbeat/outputs/elasticsearch/client.go#L500.
olivere/elastic,olivere/elastic,guilherme-santos/elastic,guilherme-santos/elastic