Class MqttHeaderAccessor

java.lang.Object
org.springframework.integration.mqtt.support.MqttHeaderAccessor

public final class MqttHeaderAccessor
extends Object
Helper for typed access to incoming MQTT message headers.
Since:
5.3
Author:
Gary Russell
  • Method Details

    • receivedTopic

      @Nullable public static String receivedTopic​(Message<?> message)
      Return the received topic header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • id

      @Nullable public static Integer id​(Message<?> message)
      Return the MQTT message id.
      Parameters:
      message - the message.
      Returns:
      the header.
    • receivedQos

      @Nullable public static Integer receivedQos​(Message<?> message)
      Return the received QOS header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • receivedRetained

      @Nullable public static Boolean receivedRetained​(Message<?> message)
      Return the received retained header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • duplicate

      @Nullable public static Boolean duplicate​(Message<?> message)
      Return the duplicate header.
      Parameters:
      message - the message.
      Returns:
      the header.