aneoconsulting / ArmoniK.Core

Task manager for ArmoniK (submission, scheduling, IO data, monitoring). Implements API located in https://github.com/aneoconsulting/ArmoniK.Api
https://aneoconsulting.github.io/ArmoniK.Core/
GNU Affero General Public License v3.0
10 stars 8 forks source link

fix: recreate rabbit connection when closed #779

Closed aneojgurhem closed 1 week ago

aneojgurhem commented 1 week ago

Motivation

When there is an issue with Rabbit connection and it closes, the agent cannot receive new messages because the connection is not recreated. Agent has to restart for Rabbit Adapter to work again.

Description

As for Amqp, an ExecutionSingleizer was used to create a unique connection. It returns the existing connection when the connection is not closed. When the connection is closed, it creates a new one and returns it.

Testing

Unit tests and integration tests were run and no issue appears.

Impact

Improves ArmoniK resiliency when RabbitMQ encounters issues.

Checklist