bludot/redisInGo

pub/sub demo

★ 0Forks 0GoGitHub ↗Compare

README

redisInGo

A Redis pub/sub demo in Go: one service publishes, another subscribes, and Redis sits between them.

Written to see the mechanics end to end rather than to be depended on.

What is here

Path What it is
publisher/ publishes messages to a Redis channel
subscriber/ subscribes to that channel and prints what arrives
redis/conf/ the Redis config the compose file mounts

The two services are separate Go modules with a Dockerfile each, so they build and run independently.

Running it

docker compose up

That starts Redis, the publisher and the subscriber together. To run a side outside Docker, go run main.go from publisher/ or subscriber/ with Redis reachable on its usual port.

Contributors

bludotpercybolmer

Issues