Abusing rabbitmq connection
dfoderick opened this issue · 1 comments
dfoderick commented
Description of problem:
Performance is poor, rabbitmq process cpu is high and raspberry pi becomes unstable after a day or two of running.
The connection to rabbit is being opened and closed on every new message published.
Instead of opening a new connection just to publish a message it can open a new channel on the same connection used for listening. This will stop it from creating an expensive connection each time. Channels are lightweight.
Proposed fix will be in pull request with additional refactoring to come.
dfoderick commented
code refactored to open/close channels instead of connections