Skip to content

source.length

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

Signature: source.length()

Returns: Integer length - the number of bytes

Get the number of bytes in the source message.

Note

This method only applies to Binary formatted messages.

Parameters

None

Example

// Example: Branch on the size of the binary payload that was received.

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

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