Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Dec 28, 2024
1 parent 6655ad0 commit 7539171
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,36 @@
[![docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/off_broadway_redis_stream/)

A Redis Stream consumer for [Broadway](https://github.com/dashbitco/broadway).
A Redis Stream consumer implementation for [Broadway](https://github.com/dashbitco/broadway), enabling concurrent processing of Redis Stream messages with built-in fault tolerance and automatic failover.

Broadway producer acts as a consumer in the specified Redis stream consumer group. You can run multiple consumers to get better throughput and fault tolerance. Please check [Redis Stream Intro](https://redis.io/topics/streams-intro) for details on stream data type.

## Features

- Seamless integration with Broadway for concurrent message processing
- Automatic failover and message recovery when nodes fail
- Configurable consumer groups for distributed processing
- Message retry handling with configurable attempts

It supports failover by automatically claiming pending messages when a node dies. A node is considered dead when it fails to send heartbeats.

## Installation

Add `off_broadway_redis_stream` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:off_broadway_redis_stream, "~> x.x.x"}
]
end
```

## Usage

### Basic Setup

Here's a complete example demonstrating how to set up a Broadway pipeline with Redis Stream:

```elixir
defmodule MyBroadway do
use Broadway
Expand Down Expand Up @@ -59,17 +84,7 @@ defmodule MyBroadway do
end
```

Currently, it only supports Redis 6.0.2 and above.

## Installation

```elixir
def deps do
[
{:off_broadway_redis_stream, "~> x.x.x"}
]
end
```
Check [documentation](https://hex.pm/packages/off_broadway_redis_stream) for more details.

### License

Expand Down

0 comments on commit 7539171

Please sign in to comment.