(Quick Reference)

convert

Purpose

Sets the automatic message body conversion mode.

Examples

static rabbitConfig = [
    queue: "example.queue",
    convert: MessageConvertMethod.ALWAYS
]

Description

There are 3 convert modes:

Enum ValueEffect
MessageConvertMethod.DISABLEDThe message is never automatically converted. The message handler always receives a byte array.
MessageConvertMethod.HEADERThe message will only be automatically converted if the incoming message has the content-type property set and a matching converter is found based on that content-type.
MessageConvertMethod.ALWAYSThe message will be automatically converted as long as a suitable message converter and message handler are found. This is the default mode.