Skip to content

Connectum API Reference / @connectum/events-amqp / types / AmqpSerializationOptions

Interface: AmqpSerializationOptions

Defined in: packages/events-amqp/src/types.ts:140

Serialization metadata and optional wire transcoding.

Properties

contentType?

readonly optional contentType?: string

Defined in: packages/events-amqp/src/types.ts:146

AMQP contentType message property.

Default

ts
"application/protobuf"

decode?

readonly optional decode?: (content) => Uint8Array

Defined in: packages/events-amqp/src/types.ts:159

Transform the incoming wire body before it reaches the event handler. Failures nack the message (requeue per consumer policy).

Parameters

content

Uint8Array

Returns

Uint8Array


encode?

readonly optional encode?: (payload) => Uint8Array

Defined in: packages/events-amqp/src/types.ts:153

Transform the outgoing wire body. Receives the payload bytes the EventBus (or the application) produced. Failures reject the publish with AmqpSerializationError.

Parameters

payload

Uint8Array

Returns

Uint8Array