Skip to content

message.length

Use when: You want to read values from the modified message during mapping. If you need the original incoming message, use source.length.

Signature: message.length()

Returns: Integer length - the number of bytes

Get the number of bytes in the message.

Note

This method only applies to Binary formatted messages.

Parameters

None

Example

// Example: Branch on the size of a binary payload.

// Get the number of bytes in the message
var byteCount = message.length();

if (byteCount == 0) {
   qie.debug('The binary payload is empty.');
}