advancedTop 15 Database Design Questions
Design a database for distributed message queue / event store.
events(id UUID PK, stream_id VARCHAR, event_type VARCHAR, payload JSONB, created_at TIMESTAMPTZ DEFAULT NOW(), global_seq BIGSERIAL UNIQUE) stream_checkpoints(stream_id VARCHAR PK, consumer_group VARCHAR, last_global_seq BIGINT) -- track consumer position dead_letter_queue(id UUID, original_event_id UUID FK, error_message TEXT, retry_count INT, last_retried_at TIMESTAMPTZ) Partitioning: events by
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
Design a database for distributed message queue / event store.