Docker swarm or Docker-compose High Availability

I don’t understand if docker-compose or docker swarm could help me, I want to create a docker container from an app (logstash in this case), but I don’t need two logstash containers processing all queries at the same time.
I just need some like… if a logstash A is down, the queries will be executed in a logstash B.

For the moment I only have 1 logstash without docker but when someone of my team destroys something logstash can’t begin to run queries and we lose data, here I’m talking about High Availability.

Then…I think about move logstash inside a container for this purpose, I was thinking this idea with docker-compose, but replicas seems doesn’t work as I want it. I’m reading about the swarm, although the nearest approach that can help me is Blue-Green deployment, I don’t know if is the correct approach for my problem.

Source: StackOverflow