I use RabbitMQ. He has sorcery where there are different queries to the database. And I have piling up the connection to the database, since they are not closed (the script is not completed, and waits for new messages).
Question: what are the correct ways of closing connections?
1. Or register close the connection after saving the message.
2. Or not to close (but it eats a lot of resources)
3. Or is there something else.