April 2020
Intermediate to advanced
292 pages
6h 50m
English
As mentioned earlier, Message DB is built on top of PostgreSQL. It’s a lot simpler than you might expect a piece of messaging infrastructure to be. It boils down to a single messages table[27] with some indexes[28] and user-defined functions[29] that we use to interact with the table rather than querying against the messages table directly. We won’t walk through all of the code making up the Message Store itself, but let’s do inspect the messages table:
| | CREATE TABLE IF NOT EXISTS message_store.messages ( |
| | id UUID NOT NULL DEFAULT gen_random_uuid(), |
| | stream_name text NOT NULL, |
| | type text NOT NULL, |
| | position bigint NOT NULL, |
| | global_position bigserial NOT NULL, |
| | data jsonb, ... |
Read now
Unlock full access