Skip to content

Collection of code snippets to implement some common use cases with StackExchange.Redis

License

Notifications You must be signed in to change notification settings

ettenauer/StackExchange.Redis.Snippets

Repository files navigation

StackExchange.Redis.Snippets

Redis can be used as in-memory data structure store, a database, cache, or message broker. The StackExchange.Redis libary is a very popular library in the .net ecosystem to intgrate Redis. This repository includes a collection of code snippets which are using the StackExchange.Redis library to solve some selected common problems.

Get Started

  • run redis via docker-compose locally by using https://github.com/ettenauer/StackExchange.Redis.Snippets/blob/main/local-environment/docker-compose.yml
  • unit tests configured in solution require local redis instance

Code Snippets

Use a lua-script to coordinate action by lock via lease time and fencing token across multiple instances

Use a stream to implement competitive consumer to process messages across multiple instances

Use a stream to implement isolated consumer to process messages across multiple instances

About

Collection of code snippets to implement some common use cases with StackExchange.Redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published