If you want to use postgres, you'll need to have a checkpoints table which looks like so:
CREATE TABLE checkpoints (
projection_id TEXT NOT NULL,
correlation_id UUID NOT NULL,
last_event_id BIGINT NOT NULL,
PRIMARY KEY (projection_id, correlation_id)
);
The primary key can be an arbitrary name of your projection. The postgres event handler runs your projection concurrently by correlation_id. So if you rely on ordering between some specific events, ensure they share the same correlation id.
If you want to use postgres, you'll need to have a
checkpoints
table which looks like so:The primary key can be an arbitrary name of your projection. The postgres event handler runs your projection concurrently by
correlation_id
. So if you rely on ordering between some specific events, ensure they share the same correlation id.