Hi @Thirupathi,
Welcome! Multiple outputs is not supported by Filebeat as covered by this post from 2020. However, as you'll see from the post, you can run 2 instances of Filebeat, with one sending directly to Kafka and the other to Elasticsearch.
There isn't really a way to detect Kafka is down and redirect to Elasticsearch.
Hope that helps!