Skip to content

primayudantra/example-go-redis-pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architecture image

Publisher-Subscriber Example With Redis

This repository contains a simple example of a publisher-subscriber pattern implemented in Go. The publisher sends messages, and the subscriber receives and processes them accordingly.

Instructions:

  1. Clone Repository:

    git clone https://github.com/primayudantra/example-go-redis-pubsub.git
  2. Navigate to Publisher Directory:

    cd example-go-redis-pubsub/publisher
  3. Run Publisher:

    go run publisher.go

    This command will start the publisher, which will begin sending messages.

  4. Open a New Terminal Window/Tab:

  5. Navigate to Subscriber Directory:

    cd ../subscriber
  6. Run Subscriber:

    go run subscriber.go

    This command will start the subscriber, which will begin receiving and processing messages sent by the publisher.

Additional Notes:

  • The publisher and subscriber are implemented in separate Go files (publisher.go and subscriber.go) located in their respective directories.
  • Ensure that Go is installed on your system and properly configured.
  • The publisher and subscriber are designed to communicate locally. However, you can modify the code to support communication over a network if needed.
  • Feel free to explore and modify the code to fit your requirements. This example serves as a basic demonstration of the publisher-subscriber pattern in Go.

Requirements:

  • Go programming language (Golang) installed on your system.
  • Redis (Installation instruction here

Prima Yudantra - Github

About

A simple example of a publisher-subscriber pattern implemented in Go with Redis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published