{"id":20407948,"url":"https://github.com/mushoffa/redis-pubsub-go","last_synced_at":"2026-04-17T10:10:07.014Z","repository":{"id":180668777,"uuid":"428904314","full_name":"mushoffa/redis-pubsub-go","owner":"mushoffa","description":"Demo application and code example for Redis Pub/Sub using Go language","archived":false,"fork":false,"pushed_at":"2021-11-18T08:46:51.000Z","size":3373,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T20:43:37.479Z","etag":null,"topics":["docker","go","golang","pubsub","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mushoffa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-17T04:10:43.000Z","updated_at":"2022-09-07T10:53:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac5349c3-c316-4d2a-8312-d7302b68a0d0","html_url":"https://github.com/mushoffa/redis-pubsub-go","commit_stats":null,"previous_names":["mushoffa/redis-pubsub-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mushoffa/redis-pubsub-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushoffa%2Fredis-pubsub-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushoffa%2Fredis-pubsub-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushoffa%2Fredis-pubsub-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushoffa%2Fredis-pubsub-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mushoffa","download_url":"https://codeload.github.com/mushoffa/redis-pubsub-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushoffa%2Fredis-pubsub-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264535990,"owners_count":23624404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","go","golang","pubsub","redis"],"created_at":"2024-11-15T05:27:09.289Z","updated_at":"2026-04-17T10:10:01.966Z","avatar_url":"https://github.com/mushoffa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Pub/Sub Example\nThis project demonstrates the implementation publish-subscribe messaging pattern using [Redis](https://redis.io/) as message broker. The project contains code examples of publisher \u0026 subsciber service written in [Go](https://golang.org/) language.\n\n## Contents\n* [System Architecture](#system-architecture)\n* [Getting Started](#getting-started)\n  * [Prerequisites](#prerequisites)\n  * [Installation](#installation)\n* [Run](#run)\n\n## System Architecture\n![](assets/system_architecture.png)\n\n## Getting Started\n### Prerequisites\n1.  Please make sure you have [Go](https://golang.org/doc/install) installed on your system.\n2.  Please make sure you have [Docker](https://docs.docker.com/engine/install/) installed on your system.\n3.  Please make sure you have [Docker Compose](https://docs.docker.com/compose/install/) installed on your system.\n\n### Installation\n1. Clone this repository to your local machine using terminal.\n```bash\ngit clone https://github.com/mushoffa/redis-pubsub-go.git\n```\n2. Change the current working directory to the location of cloned directory.\n```bash\ncd redis-pubsub-go\n```\n3. Run the following command to run all the services in docker container.\n```bash\nmake run\n```\n\n## Run\n1. Run the following command to verify docker container is up and running.\n```bash\n$ docker ps\nCONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS         PORTS                                       NAMES\na62b3a1a2205   redis-pubsub-go_publisher    \"./publisher\"            21 minutes ago   Up 1 second    0.0.0.0:9001-\u003e9001/tcp, :::9001-\u003e9001/tcp   go-publisher\n13a50aa092ac   redis-pubsub-go_subscriber   \"./subscriber\"           21 minutes ago   Up 1 second                                                go-subscriber\n4a72e095f7b7   redis:latest                 \"docker-entrypoint.s…\"   21 minutes ago   Up 2 seconds   0.0.0.0:6380-\u003e6379/tcp, :::6380-\u003e6379/tcp   redis-pubsub\n```\n\n2. Open [http://localhost:9001/swagger](http://localhost:9001/swagger) to send HTTP request using Swagger.\n![](assets/swagger.png)\n\n3. Run 'docker logs' on publisher, and subscriber to verify the message goes through redis and received on subsriber.\n```bash\n$ docker logs -f go-publisher\n[GIN] 2021/11/17 - 17:29:34 | 200 |     358.299µs |      172.30.0.1 | POST     \"/publish\"\n```\n\n```bash\n$ docker logs -f go-subscriber\nReceived message: publisher.test, Data: \"test\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushoffa%2Fredis-pubsub-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmushoffa%2Fredis-pubsub-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushoffa%2Fredis-pubsub-go/lists"}