Interface Message

Contains an individual message that is sent to, or received from, Ably.

Hierarchy

  • Message

Properties

action?: MessageAction

The action type of the message, one of the MessageAction enum values.

clientId?: string

The client ID of the publisher of this message.

connectionId?: string

The connection ID of the publisher of this message.

createdAt?: number

The timestamp of the very first version of a given message (will differ from createdAt only if the message has been updated or deleted).

data?: any

The message payload, if provided.

encoding?: string

This is typically empty, as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute contains the remaining transformations not applied to the data payload.

extras?: any

A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads. Valid payloads include push, delta, ref and headers.

id?: string

Unique ID assigned by Ably to this message.

name?: string

The event name.

operation?: Operation

In the case of an updated or deleted message, this will contain metadata about the update or delete operation.

refSerial?: string

If this message references another, the serial of that message.

refType?: string

If this message references another, the type of reference that is.

serial?: string

This message's unique serial (an identifier that will be the same in all future updates of this message).

timestamp?: number

Timestamp of when the message was received by Ably, as milliseconds since the Unix epoch. (This is the timestamp of the current version of the message)

version?: string

The version of the message, lexicographically-comparable with other versions (that share the same serial) Will differ from the serial only if the message has been updated or deleted.

Generated using TypeDoc