Rpc Agent is a framework, with which you can develop an agent server for a RPC framework.
Quick Start
Rpc Agent provide a simple demo for a quick start.
How to Build
Make sure maven has been installed on your machine
Run
mvn clean package
to build this projectat the last, if success, you will see message like this
1 | [INFO] Reactor Summary for rpc-agent-parent 1.0-SNAPSHOT: |
rpc-agent-simple is a demo, and the target jar file is rpc-agent-simple-1.0-SNAPSHOT-jar-with-dependencies.jar
, you can rename it to rpc-agent-simple.jar
.
How to use
Run java -jar rpc-agent-simple.jar -h
to see what you can do with this tool
1 | Usage: java -jar rpc-agent-simple.jar [options] |
Run java -jar rpc-agent-simple.jar -d
to export demo config file
1 | write config file: demo.json |
Open demo.json
to see the config format
1 | { |
Run in Client Mode
Run command java -jar rpc-agent-simple.jar -f demo.json
to start a remote call
1 | java -jar rpc-agent-simple.jar -f demo.json |
Run in Server Mode
Run command java -jar rpc-agent-simple.jar -s
to start agent server, and you can use -l
option to use loopback address, use -p
option to set server port.
If server started success, it will log to console like this
1 | server started, agent path: [localhost:8080/agent] |
then you can start a remote call with Postman or other tools

How to develop
See rpc-agent-simple module
1 | ├── java |
RpcConfigParser
: parse request config toRpcRequest
andInvokerConfig
RpcRequest
: the parameter for a remote callInvokerConfig
: the remote serverInvokerBuilder
: to bulid a concreteInvoker
, for example, aInvoker
for dubbo
As you see, what you need to do is provide a RpcConfigParser
and a Invoker
with InvokerBuilder
, then you can register all this with SPI file com.gorden5566.rpc.agent.core.spi.InvokerBuilder
and com.gorden5566.rpc.agent.core.spi.RpcConfigParser
.
At last, you can custom title or vendor in pom.xml
1 | <build> |