Skip to content

pragyandas/openresty-nats-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenResty with NATS Subscriber

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

Running the example

  1. Start the services:

    docker-compose up -d
  2. Publish Messages to NATS

    nats pub demo "Hello World!"

Monitor Logs

To see the OpenResty logs:

docker-compose logs -f openresty

View Last Received Message

To see the last message received from NATS:

curl http://localhost:8080/last_message

About

Toy setup with OpenResty and NATS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages