Skip to content

Avoid acknowledge last message if the channel is already closed #67

@alexcams

Description

@alexcams

When the stop function is called to finish consumer thread and cleanup rabbitmq connection, a signal is sent to the queue (@internal_queue.put(INTERNAL_QUEUE_POISON)) to finish thread handler, then channel and connection are closed right after sending the signal. There's the possibility that the poll executes a cycle just before consume the exit signal but with the channel already closed where [last message is acknowledge] (https://github.com/logstash-plugins/logstash-integration-rabbitmq/blob/main/lib/logstash/inputs/rabbitmq.rb#L264), raising this exception

We'd need to check if channel is closed before sending this ack, or handle the exception properly and warn that last message hasn't been acknowledged.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingplugin:inputIssues affecting the Input Plugin

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions