Class MoleculerRunner
java.lang.Object
services.moleculer.config.MoleculerRunner
Runs Service Broker as a standalone Java application (or Windows service).
The configuration is loaded with Spring Framework.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final AtomicReference<org.springframework.context.ConfigurableApplicationContext> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
context
protected static final AtomicReference<org.springframework.context.ConfigurableApplicationContext> context
-
-
Constructor Details
-
MoleculerRunner
public MoleculerRunner()
-
-
Method Details
-
main
Starts/stops Moleculer as a standalone application or as a Windows service. Optional start parameters:- First: Relative or absolute config path (eg. "/conf/moleculer.config.xml") or Spring Boot main class
- Second: port number (eg. "6788")
- Third: command to stop service (eg. "secret432")
- First: STOP (exactly this word)
- Second: port number (eg. "6788")
- Third: command to stop service (eg. "secret432")
- Parameters:
args- configuration path or "STOP" to stop service, UDP port, and a "secret message" to stop Moleculer service- Throws:
Exception- fatal exception (unable to find JARs, invalid Java version, etc.)
-