MessageHelper.createMessage

A shortcut factory method for creating a message with the given payload and {@code MessageHeaders}. <p><strong>Note:</strong> the given {@code MessageHeaders} instance is used directly in the new message, i.e. it is not copied. @param payload the payload to use (never {@code null}) @param messageHeaders the headers to use (never {@code null}) @return the created message @since 4.1

  1. MessageBase createMessage(Object payload, MessageHeaders messageHeaders)
    class MessageHelper
    static
    createMessage
    (
    T
    )
    if (
    is(T == class) ||
    is(T == interface)
    )
  2. Message!(T) createMessage(T payload, MessageHeaders messageHeaders)

Meta