An open API service indexing awesome lists of open source software.

https://github.com/abhirockzz/nats-hello-world-docker

NATS pub sub example with Go and Java client (using Docker Compose)
https://github.com/abhirockzz/nats-hello-world-docker

docker docker-compose golang java nats-messaging nats-server natsio

Last synced: 2 months ago
JSON representation

NATS pub sub example with Go and Java client (using Docker Compose)

Awesome Lists containing this project

README

        

## Start by...

- `git clone https://github.com/abhirockzz/nats-hello-world-docker.git`
- `cd nats-hello-world-docker/java-publisher`
- `mvn clean install`
- `cd ..`

## To run

`docker-compose build --no-cache` //build containers

Give it a few seconds

![](https://simplydistributed.files.wordpress.com/2018/03/docker-compose-up.jpg)

`docker-compose up` //start containers

## check

### check NATS console

`http://:8222`

![](https://simplydistributed.files.wordpress.com/2018/03/nats-console.jpg)

`http://:8222/connz`

![](https://simplydistributed.files.wordpress.com/2018/03/nats-connz.jpg)

### check `docker-compose` logs

Pub and sub... the usual stuff

![](https://simplydistributed.files.wordpress.com/2018/03/app-logs.jpg)

## .. clean up using

`docker-compose down`