This is a simple example of how to use OpenResty to subscribe to NATS messages.
It uses NATS client protocol reference on a regular TCP socket
-
Start the services:
docker-compose up -d
-
Publish Messages to NATS
nats pub demo "Hello World!"
To see the OpenResty logs:
docker-compose logs -f openrestyTo see the last message received from NATS:
curl http://localhost:8080/last_message