Interface Message<T>

Type Parameters:
T - the type of the message body

public sealed interface Message<T>
Represents a STOMP message with headers and a body.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the body of the message.
    Returns the headers of the message.
  • Method Details

    • headers

      Headers headers()
      Returns the headers of the message.
      Returns:
      the headers
      Since:
      1.0.0
    • body

      Optional<T> body()

      Returns the body of the message. If the Message Object has been received, the body has been converted using the configured MessageConverter. If the Message Object is given to the STOMP client for sending, the body will be converted using the configured MessageConverter.

      If the body is not present, an empty Optional is returned.

      Returns:
      the body
      Since:
      1.0.0