Skip to Content
SQL ReferenceTopic Pub/Sub SQL

Topic Pub/Sub SQL

Topic Pub/Sub SQL in KalamDB is documented in the Topic Pub/Sub section because the same workflow covers setup, inspection, and consumer-group behavior.

For the canonical command reference, see SQL Topics & Consumers.

Syntax Covered

The topic SQL reference covers:

  • CREATE TOPIC ... PARTITIONS ...
  • ALTER TOPIC ... SET RETENTION ...
  • ALTER TOPIC ... ADD SOURCE ... ON INSERT|UPDATE|DELETE ...
  • CONSUME FROM ... GROUP ... FROM ... LIMIT ...
  • ACK ... GROUP ... UPTO OFFSET ...
  • RESET CONSUMER GROUP ... ON ... TO ...
  • CLEAR TOPIC and DROP TOPIC

Quick Example

SQL
CREATE TOPIC app.user_events PARTITIONS 1; ALTER TOPIC app.user_eventsADD SOURCE app.usersON INSERTWITH (payload = 'full'); CONSUME FROM app.user_eventsGROUP 'ai-worker'FROM EARLIESTLIMIT 10; ACK app.user_eventsGROUP 'ai-worker'UPTO OFFSET 9;

Continue with SQL Topics & Consumers for retention options, payload modes, consumer group offset rules, ACK behavior, and admin reset commands.

Last updated on