Logstash configuration when ES is down

Hi, what happens when I want to stream my output data from logstash to ElasticSearch when ES is down ? how does logstash take care? and how can I configure my logstash to ensure my pipeline executed successfully.
please help me understand.
thanks.

Duplicate of Logstash output streaming when ES is down.