Supervisor It the recommended way to run the app/console oro:message-queue:consume
and app/console clank:server
commands.
As you read before consumers can normally interrupt the message procession by many reasons.
In the all cases above the interrupted consumer should be re-run.
So you must keep runningoro:message-queue:consume
command and to do this best we advise you to delegate this responsibility to Supervisord.
github.com/orocrm/platform/tree/2.1.2/src/Oro/Bundle/MessageQueueBundle#supervisord
Step 1. aptitude install supervisor
aptitude install supervisor
Step 2. Check the Supervisor it is installed correctly:
service supervisor restart
Step 3. My Supervisor configuration for OroCRM
Step 4. Restart Supervisor and check the logs
service supervisor restart
/var/log/supervisor/supervisord.log
:
2017-05-18 10:13:56,139 INFO spawned: ‘crm.mage2.pro$message_consumer’ with pid 21060
2017-05-18 10:13:56,140 INFO spawned: ‘crm.mage2.pro$web_socket’ with pid 21061
2017-05-18 10:13:56,448 INFO success: crm.mage2.pro$message_consumer entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2017-05-18 10:13:56,448 INFO success: crm.mage2.pro$web_socket entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)