# Logstash With RabbitMQ Never Finish Process

**URL:** https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696
**Category:** Logstash
**Created:** [January 30, 2018, 7:43pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696 "2018-01-30T19:43:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mpinheiro](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mpinheiro](https://discuss.elastic.co/u/mpinheiro)
#### Post date: [January 30, 2018, 7:43pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/1 "2018-01-30T19:43:55Z")

</div>

Hi everyone, I've a problem when i'm running my logstash config with the rabbitmq input plugin, the process never ends, it keeps running forever. I would like to finish logstash process when all my queue documents was processed.

My config:

```
input {
  rabbitmq {
        host => "myhost"
        queue => "fnc_calculo"
        durable => true
        password => "guest"
        user => "guest"
    }
}
output {
  elasticsearch {
    codec => rubydebug
    hosts => "elastic:9200"
    index => "tb_fnc_calculo"
      document_type => "fnc_calculo"
  }
  stdout { codec => rubydebug }
}

```

\*I'm using logstash 6.1.2

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [January 30, 2018, 9:14pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/2 "2018-01-30T21:14:12Z")

</div>

That's not supported by the rabbitmq input.

---

<div class="post-metadata">

### Author: ![mpinheiro](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mpinheiro](https://discuss.elastic.co/u/mpinheiro)
#### Post date: [February 1, 2018, 12:08pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/3 "2018-02-01T12:08:49Z")

</div>

Right, although, how i can work with a CI tool like jenkins? Because if i keep it running, it doesn't get new docs uploaded to the queue, and if a close process by jenkins timeout configuration, it doesn't finish as sucess but as warning.

Thanks for you attention

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [February 1, 2018, 12:14pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/4 "2018-02-01T12:14:06Z")

</div>

> Right, although, how i can work with a CI tool like jenkins?

Running Logstash with a rabbitmq input in a Jenkins job doesn't strike me as a very good idea. Jenkins is meant for time-bound jobs that are triggered manually, via cron, or via some other external trigger. Continuously fetching messages from a queue and indexing them in ES doesn't fit doesn't follow either of those patterns.

> Because if i keep it running, it doesn't get new docs uploaded to the queue

What do you mean? If Logstash is running with a rabbitmq input it'll get all message arriving to the queue until it's shut down.

---

<div class="post-metadata">

### Author: ![mpinheiro](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mpinheiro](https://discuss.elastic.co/u/mpinheiro)
#### Post date: [February 1, 2018, 1:29pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/5 "2018-02-01T13:29:46Z")

</div>

> Running Logstash with a rabbitmq input in a Jenkins job doesn't strike me as a very good idea. Jenkins is meant for time-bound jobs that are triggered manually, via cron, or via some other external trigger. Continuously fetching messages from a queue and indexing them in ES doesn't fit doesn't follow either of those patterns.

@magnusbaeck I was wrong about rabbitmq concept. All my logstashs are running in a jenkins and i was trying put the rabbitmq integration as well.

It's clear now, how it works and how i should develop it. Thanks for your time and answer.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 1, 2018, 1:30pm UTC](https://discuss.elastic.co/t/logstash-with-rabbitmq-never-finish-process/117696/6 "2018-03-01T13:30:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
