Skip to content

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

Interface: AmqpSerializationOptions ​

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

Serialization metadata and optional wire transcoding.

Properties ​

contentType? ​

readonly optional contentType?: string

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

AMQP contentType message property.

Default ​

ts
"application/protobuf"

decode? ​

readonly optional decode?: (content) => Uint8Array

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

Transform the incoming wire body before it reaches the event handler. A failure rejects the message without requeue (basic.nack with requeue: false): the broker drops it, or dead-letters it when the queue has a dead-letter exchange. Nothing is thrown or reported, and the handler never sees the message.

Parameters ​

content ​

Uint8Array

Returns ​

Uint8Array


encode? ​

readonly optional encode?: (payload) => Uint8Array

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

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