0

Currently I am running using command php arisan start.listening.mqtt. However, it will be killed if no more active on the screen. So can any one suggest a better way for 2 objective

  1. Run the MQTT listener as background process through Laravel code
  2. When the server reboot, it is started automatically.

Currenly I am using AWS Ubuntu server to run Mosquitto

matiaslauriti
  • 7,065
  • 4
  • 31
  • 43
Joe Ijam
  • 2,123
  • 4
  • 19
  • 30
  • Are you running queue workers already? It is a daemon process similar to an MQTT worker, so you might want to check out [the suggested supervisor configuration in the docs](https://laravel.com/docs/9.x/queues#supervisor-configuration). – Namoshek Dec 07 '22 at 20:19
  • In addition to the comment above: basically you'll need to follow the [official guide](https://laravel.com/docs/9.x/queues#supervisor-configuration) but put `php arisan start.listening.mqtt` into the `command=` field. – Dmitry C Dec 07 '22 at 20:36

0 Answers0