Skip to content

kokizzu/redispubsub1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis Pub/Sub At Least Once Delivery Example

this example demo-ing how to make Redis that are by default only have two mode:

  • broadcast mode (at most once delivery, so if client down at the moment of broadcast time they will not ever receive the message)
  • queue mode (at last once delivery, but not broadcasting/without consumer group, so 1 message only acked by 1 subscriber)

to mimic Kafka/Jetsream/standard-AMQP, we need to have both: broadcast (having a customer group) and at last once delivery (ack per consumer group)

How to run

docker compose up

go run main.go publisher topic1

on another terminal:

go run main.go subscriber topic1

go run main.go subscriber topic1 subscriber1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages