Close connections on Rabbitmq communication
Summary
Every time Resource Cataloguer publish content in RabbitMQ it creates a new connection and never close it. It makes RabbitMQ consumes a large piece of memory
Steps to reproduce
- Run an external resource that creates resource on the platform
- Access http://localhost:15672/#/ to see RabbitMQ GUI overview
- Verify the increasing number of connections
- When RabbitMQ reach a critical amount of memory, it stops to reiceive new connections.
Possible fixes
There are two possibilities for fixing this bug:
- Create a shared connection that can be used whenever a message is published on RabbitMQ
- (EASIER) Close the current open connections