Skip to main content

Crate eventuary_postgres

Crate eventuary_postgres 

Source
Expand description

PostgreSQL event log backend for eventuary.

Provides an append-only events table backed by sqlx::PgPool with source cursors (PgCursor) ordered by BIGSERIAL sequence. PgReader is a source reader: its acker advances only the active in-memory stream cursor, and nack leaves the row eligible for redelivery by that stream.

Durable consumer progress is owned by PgCheckpointStore and composed with eventuary_core::io::reader::CheckpointReader. Checkpoints are keyed by (consumer_group_id, stream_id, cursor_id) and store the full cursor as JSON.

Schema setup is component-owned. Use each component’s Component::schema_sql(config) method (PgWriter::schema_sql, PgReader::schema_sql, PgCheckpointStore::schema_sql, …) to generate DDL, and the corresponding Component::connect(pool, config).await or Component::prepare_schema(pool, config).await to apply it.

PgDatabase::connect(...) only opens a pool and does not create Eventuary tables.

Modules§

buffer
PostgreSQL BufferStore implementation.
checkpoint
claim_buffer
Postgres-backed ClaimedBufferStore implementation.
coordinator
database
dedupe
PostgreSQL DedupeStore implementation.
multiplexer
PostgreSQL MultiplexerStore implementation.
partitioning
reader
relation
watermark
PostgreSQL WatermarkStore implementation.
writer