Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMessage

Liftbridge message interface.

Hierarchy

  • IMessage

Index

Properties

Optional ackInbox

ackInbox: undefined | string

Sets the NATS subject Liftbridge should publish the message ack to. If it's not set or if there's no Deadline, Liftbridge will not send an ack.

Optional ackPolicy

ackPolicy: undefined | 0 | 1 | 2

Controls the behavior of message acks sent by the server. By default, Liftbridge will send an ack when the stream leader has written the message to its write-ahead log.

Optional correlationId

correlationId: undefined | string

Sets the identifier used to correlate an ack with the published message.

Defaults to a unique ID generated by hyperid.

Optional headers

Key-value pairs to set on the Message headers map.

Optional key

key: Uint8Array | string | null

Key to set on the Message. If Liftbridge has stream compaction enabled, the stream will retain only the last value for each key.

Optional partition

partition: number | undefined

Specifies the stream partition to publish the message to. If this is set, any partitioner will not be used. This is a pointer to allow distinguishing between undefined and 0.

Optional partitionStrategy

partitionStrategy: keyof BuiltinPartitioners | PartitionerLike | undefined

Specifies the strategy for mapping a message to a stream partition.

Can be either a string (see BuiltinPartitioners) or a custom implementation of BasePartitioner.

Optional subject

subject: undefined | string

Message subject.

value

value: Uint8Array | string

Value to set on the Message for the key.