DataTransformer interface

Describes the transformations that can be performed to encode/decode the data before sending it on (or receiving it from) the wire.

Properties

decode

A function that takes the body property from an AMQP message and returns the decoded message body. If it cannot decode the body then it returns the body as-is.

encode

A function that takes the body property from an EventData object and returns an encoded body (some form of AMQP type).

Property Details

decode

A function that takes the body property from an AMQP message and returns the decoded message body. If it cannot decode the body then it returns the body as-is.

decode: (body: any) => any

Property Value

(body: any) => any

encode

A function that takes the body property from an EventData object and returns an encoded body (some form of AMQP type).

encode: (body: any) => any

Property Value

(body: any) => any