Skip to Content
🚀 KalamDB v0.3.0-alpha2 is out — Learn more
Topic Pub/SubSQL Topics & Consumers

SQL Topics & Consumer Groups

Topics provide a durable pub/sub messaging layer built on top of KalamDB tables.

CREATE TOPIC

CREATE TOPIC <topic_name>; CREATE TOPIC <topic_name> PARTITIONS <count>;

ADD SOURCE

ALTER TOPIC <topic_name> ADD SOURCE <table_name_or_namespace.table_name> ON <INSERT|UPDATE|DELETE> [WHERE <filter_expression>] [WITH (payload = '<key|full|diff>')];

CONSUME FROM

CONSUME FROM <topic_name> [GROUP '<group_id>'] [FROM <LATEST|EARLIEST|offset>] [LIMIT <count>];

ACK

ACK <topic_name> GROUP '<group_id>' [PARTITION <partition_id>] UPTO OFFSET <offset>;
Last updated on