Skip to main content

Subscription-event-stream-batch

One chunk of events in a stream. A batch consists of an array of events plus a cursor pointing to the offset of the last event in the stream.

The size of the array of event is limited by the parameters used to initialize a Stream.

Sequential batches might present repeated cursors if no new events have arrived.

cursor objectrequired
event_typestringrequired

The name of the event type this partition's events belong to.

Possible values: non-empty

cursor_tokenstringrequired

An opaque value defined by the server.

Possible values: non-empty

partitionstringrequired

Id of the partition pointed to by this cursor.

Possible values: non-empty

offsetstringrequired

Offset of the event being pointed to. Note that if you want to specify beginning position of a stream with first event at offset N, you should specify offset N-1. This applies in cases when you create new subscription or reset subscription offsets. Also for stream start offsets one can use two special values: - begin - read from the oldest available event. - end - read from the most recent offset.

Possible values: non-empty

infoobject

This object contains general information about the stream. Used only for debugging purposes. We recommend logging this object in order to solve connection issues.

Clients should not parse this structure.

events object[]

[Payload of an Event. Usually represents a status transition in a Business process.]

Possible values: >= 1

  • Array [
  • metadata objectrequired

    Metadata for this Event.

    eidstring<uuid>required

    Unique identifier of this Event. Consumers MIGHT use this value to assert uniqueness of reception of the Event.

    Possible values: non-empty

    event_typestringrequired

    The EventType of this Event.

    Possible values: non-empty

    occurred_atstring<date-time>required

    Timestamp of creation of the Event generated by Mambu.

    Possible values: non-empty

    content_typestringrequired

    Notification content format.

    Possible values: non-empty, [application/xml, application/json, text/plain; charset=UTF-8]

    categorystringrequired

    Indicates if the content of the notification can be configured in Mambu or it is fixed. Currently only one category is supported: DATA

    Possible values: non-empty

    bodystringrequired

    Actual content of the notification.

    Possible values: non-empty

    template_namestringrequired

    Name of the notification template.

    Possible values: non-empty

  • ]
  • Subscription-event-stream-batch
    {
    "cursor": {
    "event_type": "string",
    "cursor_token": "string",
    "partition": "string",
    "offset": "string"
    },
    "info": {},
    "events": [
    {
    "metadata": {
    "eid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "event_type": "string",
    "occurred_at": "2024-07-29T15:51:28.071Z",
    "content_type": "application/xml",
    "category": "string"
    },
    "body": "string",
    "template_name": "string"
    }
    ]
    }