Public Repository

Last pushed: 3 months ago
Short Description
A simple messaging proxy
Full Description

This proxy server allows clients to arbitrarily specify a subject and publish messages directly to without using the default client libraries.


$ docker pull aaguilar/nats-proxy


$ nats-proxy --help messaging proxy

usage: nats-proxy [options]

  -p --port    Port number (Default: 8080)
  -n --nats    NATS server URL (Default: nats://
  -d --debug   Enable debug output
  -t --tls     Enable TLS / HTTPS
  -C --cert    Server certificate file
  -K --key     Private key file
  -h --help    Print this list and exit
  -v --version Print the current version

Publishing data to NATS

External clients can issue HTTP post requests to the default route / and publish messages directly to, for example:

curl -s -H "Content-Type: application/json" \
-X POST -d '{"__subject":"CUSTOMER","account":"ACC-123456789","orders":"PO-123456789"}' \

This command will post the JSON data to the default route http://localhost:8080/, the nats-proxy server will read and parse the JSON data and will publish this data to with a subject called CUSTOMER.


You can monitor nats-proxy and view live stats by accessing the http://localhost:8080/.

Run in Docker container

You can run nats-proxy in a Docker container as follows:

# run the container
docker run -it --rm -p 8080:8080 aaguilar/nats-proxy -p 8080 -n nats://localhost:4222
Docker Pull Command