Versions Compared

Key

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

E4C Message Broker needs to be executed as a Windows service. Thus, it is necessary to create and configure the service in order to make the Message Broker work. To create service, open command line as administrator and run a command like:

Code Block
sc create E4CmessageBroker DisplayName= "E4C Message Broker" binPath= "C:\Program Files (x86)\proaxia\E4C Message Broker\ E4CwinService.exe" obj= "NT AUTHORITY\LocalService" 

Depending on the directory, to which you extracted the Message Broker archive, the path in the above command can be different. When entering the command, please note that for each parameter a space character after = sign is used. This is necessary for the command to work properly. The command creates Windows service named E4CMessageBroker, with display name E4C Message Broker and registered to run in context of LocalService user. In case there is more than one instance of Message Broker installed on the same server, you need to create a separate service for each of them. Please remember to give the services distinct names (e.g. E4CdevMessageBroker, E4CtestMessageBroker and E4CprodMessageBroker) and distinct display names. The service created with the sc command as above are set up to be run manually and switched off. After having configured the Message Broker (as described in subsequent section) and having run the service successfully (no errors in logs), you should switch the service startup type from Manual to Automatic.

...

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