go_zoom_kinesis::store

Module dynamodb

source
Expand description

DynamoDB implementation of checkpoint storage with configurable retry behavior

By default, the DynamoDB checkpoint store will retry indefinitely to ensure no checkpoints are lost. This behavior can be modified using the builder pattern.

§Examples

use go_zoom_kinesis::store::{DynamoDbCheckpointStore};
use std::time::Duration;
use go_zoom_kinesis::retry::RetryConfig;

async fn example() -> anyhow::Result<()> {
// Default configuration - will retry forever
let store = DynamoDbCheckpointStore::builder()
    .with_client(dynamo_client.clone())
    .with_table_name("checkpoints".to_string())
    .build()?;

// Custom configuration with limited retries
let store = DynamoDbCheckpointStore::builder()
    .with_client(dynamo_client)
    .with_table_name("checkpoints".to_string())
    .with_retry_config(RetryConfig {
        max_retries: Some(3),  // Try 3 times then warn and continue
        initial_backoff: Duration::from_millis(100),
        max_backoff: Duration::from_secs(5),
        jitter_factor: 0.1,
    })
    .build()?;

Structs§