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
[x] My code adheres to the coding and style guidelines of the project.
[x] I have performed a self-review of my code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] I have thoroughly tested my modifications and added tests when necessary.
[x] Tests pass locally and in the CI.
[x] I have assessed the performance impact of my modifications.
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