Skip to main content

Subscription

Subscription is a high level consumption unit. Subscriptions allow applications to easily scale the number of clients by managing consumed event offsets and distributing load between instances. The key properties that identify a subscription are owning_application, event_types and consumer_group. It is not possible to have two different subscriptions with these properties being the same.

idstring

ID of subscription that was created. Is generated by Mambu, should not be specified when creating a subscription.

Possible values: non-empty

owning_applicationstringrequired

The id of application owning the subscription.

Possible values: non-empty

event_typesstring[]required

EventTypes to subscribe to. The order is not important. Subscriptions that differ only by the order of EventTypes will be considered the same and will have the same id. The size of the event_types list is limited by the total number of partitions within these event types. Default limit for partition count is 100.

consumer_groupstring

The value describing the use case of this subscription. In general that is an additional identifier used to differ subscriptions having the same owning_application and event_types.

Possible values: non-empty

created_atstring<date-time>

Timestamp of creation of the subscription. This is generated by Mambu. It should not be specified when creating subscription and sending it may result in a client error.

Possible values: non-empty

updated_atstring<date-time>

Timestamp of last update of the subscription. This is generated by Mambu. It should not be specified when creating subscription and sending it may result in a client error. Its initial value is same as created_at.

Possible values: non-empty

read_fromstring

Position to start reading events from. Currently supported values: - begin - read from the oldest available event. - end - read from the most recent offset. - cursors - read from cursors provided in initial_cursors property. Applied when the client starts reading from a subscription.

Possible values: non-empty

initial_cursors object[]

List of cursors to start reading from. This property is required when read_from = cursors. The initial cursors should cover all partitions of subscription. Clients will get events starting from next offset positions.

Possible values: >= 1

  • Array [
  • 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

    event_typestringrequired

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

  • ]
  • Subscription
    {
    "id": "string",
    "owning_application": "string",
    "event_types": [
    "string"
    ],
    "consumer_group": "string",
    "created_at": "2024-07-29T15:51:28.071Z",
    "updated_at": "2024-07-29T15:51:28.071Z",
    "read_from": "string",
    "initial_cursors": [
    {
    "partition": "string",
    "offset": "string",
    "event_type": "string"
    }
    ]
    }