Skip to main content

Subscription Cursors

The cursors in the Subscription API have the following structure:

The fields are:

  • partition: The partition this batch belongs to. A batch can only have one partition. In V2, partition values use the format shardId-000000000000, shardId-000000000001, etc. (V1 used simple integers like 0, 1).
  • offset: The offset of this batch. The offset is server-defined and opaque to the client — clients should not try to infer or assume a structure. The V2 offset format is a large numeric string (e.g. 49673591198887640830612221074728717584752617270261317634), different from V1's format (e.g. 001-0001-000000000000000000).
  • event_type: Specifies the event-type of the cursor. In V2, this is always MIXED for batches from the events endpoint, since a batch can now contain multiple event types — see Consuming Events from a Subscription.
  • cursor_token: The cursor token generated by Mambu.

Cursor Structure

{
"partition": "shardId-000000000000",
"offset": "49673591198887640830612221074728717584752617270261317634",
"event_type": "MIXED",
"cursor_token": "3b0123a1-532e-4dd3-81ec-aa71a2dd443f"
}