Class MoleculerRunner

java.lang.Object
services.moleculer.config.MoleculerRunner

public final class MoleculerRunner extends Object
Runs Service Broker as a standalone Java application (or Windows service). The configuration is loaded with Spring Framework.
  • Field Details

    • context

      protected static final AtomicReference<org.springframework.context.ConfigurableApplicationContext> context
  • Constructor Details

    • MoleculerRunner

      public MoleculerRunner()
  • Method Details

    • main

      public static final void main(String[] args) throws Exception
      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")
      Optional stop parameters:
      • 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.)