Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 46 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ pip install async-kinesis
# With optional dependencies
pip install async-kinesis[prometheus] # For Prometheus metrics
pip install async-kinesis[redis] # For Redis checkpointing
pip install async-kinesis[dynamodb] # For DynamoDB checkpointing
```

## Basic Usage
Expand Down Expand Up @@ -365,25 +366,59 @@ This provides detailed information about shard allocation, closure status, paren

## Checkpointers

- memory (the default but kinda pointless)
Checkpointers manage shard allocation and progress tracking across multiple consumer instances.

```
MemoryCheckPointer()
```
### MemoryCheckPointer

- redis
The default checkpointer (but only useful for single-consumer testing):

```
RedisCheckPointer(name, session_timeout=60, heartbeat_frequency=15, is_cluster=False)
```python
MemoryCheckPointer()
```

Requires ENV:
### RedisCheckPointer

Redis-based checkpointer for distributed consumers:

```python
RedisCheckPointer(
name="consumer-group",
session_timeout=60,
heartbeat_frequency=15,
is_cluster=False
)
```
REDIS_HOST

**Requirements:**
- Install: `pip install async-kinesis[redis]`
- Environment: `REDIS_HOST` (and optionally `REDIS_PORT`, `REDIS_PASSWORD`, `REDIS_DB`)

### DynamoDBCheckPointer

DynamoDB-based checkpointer for serverless deployments:

```python
DynamoDBCheckPointer(
name="consumer-group",
table_name=None, # Optional: defaults to kinesis-checkpoints-{name}
session_timeout=60,
heartbeat_frequency=15,
create_table=True, # Auto-create table if needed
ttl_hours=24 # Automatic cleanup of old records
)
```

Requires `pip install aredis`
**Requirements:**
- Install: `pip install async-kinesis[dynamodb]`
- AWS credentials with DynamoDB permissions

**Benefits over Redis:**
- No infrastructure to manage
- Pay-per-request pricing (no idle costs)
- Automatic scaling
- Built-in backup and recovery

📖 **[DynamoDB Checkpointing Guide](./docs/dynamodb-checkpointing.md)** - Detailed setup and configuration


## Processors (Aggregator + Serializer)
Expand Down Expand Up @@ -538,6 +573,7 @@ python tests/resharding/resharding_test.py --scenario scale-up-small
- **[Getting Started Guide](./docs/getting-started.md)** - Step-by-step tutorials for beginners
- **[Common Patterns](./docs/common-patterns.md)** - Real-world use cases and examples
- **[Metrics & Observability](./docs/metrics.md)** - Prometheus integration and monitoring
- **[DynamoDB Checkpointing](./docs/dynamodb-checkpointing.md)** - DynamoDB checkpointer setup and best practices
- **[Troubleshooting Guide](./docs/troubleshooting.md)** - Solutions for common issues
- **[Architecture Details](./docs/DESIGN.md)** - Technical deep dive into the implementation
- **[Why Another Library?](./docs/YETANOTHER.md)** - Comparison with other Kinesis libraries
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:

test:
container_name: async-kinesis-test
command: ['pytest', '-v', '--cov=kinesis']
command: ['pytest', '-v', '--cov=kinesis', '-m', 'not dynamodb']
volumes:
- ./tests:/app/tests
- ./kinesis:/app/kinesis
Expand Down
Loading