Skip to content

moleculer-java/moleculer-java-repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REPL Developer Console for Moleculer

An interactive developer console for the Moleculer for Java microservices framework. It is itself a Moleculer Service that runs text commands against a live ServiceBroker: call actions, emit events, benchmark the response time of a service, inspect the cluster, and more. The console works over standard input/output or telnet, and you can register your own custom commands.

Documentation

Documentation

Download

<dependency>
    <groupId>com.github.berkesa</groupId>
    <artifactId>moleculer-java-repl</artifactId>
    <version>2.0.0</version>
</dependency>

Quick start

Install the console into a running broker, then type commands at the prompt:

ServiceBroker broker = new ServiceBroker("node-1");
broker.start();

broker.createService(new LocalRepl());   // interactive console on stdin/stdout
call math.add --a 5 --b 3     // call an action
bench math.add --a 5 --b 3    // measure its response time
help                          // list the available commands

Use RemoteRepl instead of LocalRepl to expose the console over telnet.

Requirements

Java 17 or newer.

License

This project is available under the MIT license.

Releases

Packages

Contributors

Languages