Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/russellluo/rpubsub
Reliable implementation of Publish–subscribe messaging pattern backed by Redis Streams.
https://github.com/russellluo/rpubsub
go pubsub redis
Last synced: 2 months ago
JSON representation
Reliable implementation of Publish–subscribe messaging pattern backed by Redis Streams.
- Host: GitHub
- URL: https://github.com/russellluo/rpubsub
- Owner: RussellLuo
- Created: 2018-12-10T23:37:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-08T05:55:00.000Z (almost 6 years ago)
- Last Synced: 2024-10-15T09:13:10.889Z (3 months ago)
- Topics: go, pubsub, redis
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 20
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpubsub
Reliable implementation of [Publish–subscribe messaging pattern][1] backed by [Redis Streams][2].
## Installation
```bash
$ go get -u github.com/RussellLuo/rpubsub
```## Motivation
- Learn [Redis Streams][2] by doing.
- Implement a more reliable Publish–subscribe messaging mechanism than [Pub/Sub][3].## Design & Implementation
- Publishing
+ Just use [XADD][4] directly.
- Subscribing
+ API (inspired by [Principles of designing Go APIs with channels][5]).
+ [Blocking][6] instead of polling (which means one goroutine per topic).
- Snapshotting
+ Built-in snapshotters ([NilSnapshotter][7] and [RedisSnapshotter][8]).
+ Save point (inspired by Redis's [RDB persistence][9]).## Documentation
Check out the [Godoc][10].
## License
[MIT][11]
[1]: https://en.wikipedia.org/wiki/Publish–subscribe_pattern
[2]: https://redis.io/topics/streams-intro
[3]: https://redis.io/topics/pubsub
[4]: https://redis.io/commands/xadd
[5]: https://inconshreveable.com/07-08-2014/principles-of-designing-go-apis-with-channels/
[6]: https://redis.io/commands/xread#blocking-for-data
[7]: https://godoc.org/github.com/RussellLuo/rpubsub#NilSnapshotter
[8]: https://godoc.org/github.com/RussellLuo/rpubsub#RedisSnapshotter
[9]: https://redis.io/topics/persistence#snapshotting
[10]: https://godoc.org/github.com/RussellLuo/rpubsub
[11]: http://opensource.org/licenses/MIT