Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Basically, after setting up a configuration, Message Broker in Linux system can be run directly using command line. However there is also a way to run it as a daemon. Below is a short guide how to do it based on the CentOS 8.3.2011.

  • As root go to directory /etc/systemd/system.

  • Create a file which name would match following pattern: servicename.service where servicename is a unique name the service, for instance messagebroker.service

  • The content of this file might be following:

Code Block
languagenone
[Unit]
Description=FSM MessageBroker service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=3
User=e4c
WorkingDirectory=/opt/MessageBroker/mb
ExecStart=/opt/MessageBroker/mb/MessageBroker

[Install]WantedBy=multi-user.target
  • Then running of such defined service is controlled with systemctl