Class MqttProperties

  • All Implemented Interfaces:

    @Validated()@ConfigurationProperties(prefix = "mqtt") 
    public final class MqttProperties
    
                        

    Properties for connection to the mqtt broker.

    • Method Detail

      • getHost

        @NotEmpty() final String getHost()

        The host the mqtt broker is available under.

      • getPort

        @Min(value = 1)@Max(value = 65535) final Integer getPort()

        The port the mqtt broker is available under.

      • getClientId

         final String getClientId()

        The client id this component should connect with.

      • getUsername

         final String getUsername()

        The username this component should connect with.

      • getPassword

         final String getPassword()

        The password this component should connect with.

      • getSsl

         final Boolean getSsl()

        If ssl should be used for the connection to the mqtt broker.

      • getClean

         final Boolean getClean()

        If the client should connect with a clean session.

      • getGroup

         final String getGroup()

        The optional group subscriptions should be prefixed with.

      • getConnectTimeout

         final Long getConnectTimeout()

        The timeout for connection to the broker in milliseconds.

      • getSessionExpiry

        @Min(value = 0)@Max(value = 4294967295) final Long getSessionExpiry()

        The session expiry interval in seconds. Has to be in 0, 4294967295 (0 by default). Setting the value to 0 means the session will expire immediately after disconnect. Setting it to 4_294_967_295 means the session will never expire. This setting is only going into effect for MQTT 5.