CPU usage 100% when Elasticsearch is down

I noticed that when Elasticsearch can't retrieve any more data the beats sending data went up to 100% CPU usage.
E.g. if the disc is full on the Elasticsearch server.
After clear up some space and "reset" Elasticsearch to be able to retrive data the CPU for the beats went down to normal behaviour.

It is never OK to use that much CPU and risk the other process running on the same machine.
Better loosing data than that the services stop working!

Is this a bug or can I config the beats in a better way?

yes you can but can you share the config file of those beats and which beats they are first?
Versions also..