Reputation: 527
I am new to rabbitmq
. In all tutorials of rabbitmq
in python/php says that receiver side
php receiver.php
or
python receiver.py
but how can we do this in production? if we have to run above command in production either we have to use & at last or we have to use nohup. Which is not a good idea?
How to implement rabbitmq
receiver in production server in php/python?
Upvotes: 1
Views: 204
Reputation: 1565
Consumers/Receivers tend to be managed by a process controller. Either initd
, systemd
can work. What I saw used a lot more is something like http://supervisord.org/ or http://godrb.com/ or https://mmonit.com/
In production you ideally want to not only have something that will make sure a process is running, but also that the logs are separated and rolled, that you have some amount of monitoring to make sure a process is not just constantly restarting at boot or otherwise. Those tools are better adapted than running by hand.
Upvotes: 2