Interface MqttClientConfiguration

All Known Subinterfaces:
Mqtt3ClientConfiguration, Mqtt5ClientConfiguration

public interface MqttClientConfiguration
MQTT Client Configuration. You will probably want to inject either Mqtt3ClientConfiguration or Mqtt5ClientConfiguration.
Since:
3.0.0
Author:
Sergio del Amo
  • Method Details

    • getServerUri

      URI getServerUri()
      Returns:
      the uri of server to connect to as [schema]://[serverHost]:[serverPort].
    • getServerHost

      String getServerHost()
      Returns:
      the server host of the configured server URI.
    • getServerPort

      Integer getServerPort()
      Returns:
      the server port of the configured server URI.
    • isSSL

      boolean isSSL()
      Returns:
      true if the schema of the configured server URI is ssl.
    • getClientId

      String getClientId()
      Returns:
      the client identifier.
    • getMqttVersion

      int getMqttVersion()
      Returns:
      the MQTT version to use.
    • getConnectionTimeout

      Duration getConnectionTimeout()
      Returns:
      the connection timeout.
    • getManualAcks

      boolean getManualAcks()
      Returns:
      an optional boolean to set the client in manual acknowledge mode.
    • getPassword

      byte[] getPassword()
      Returns:
      the password to use for MQTT connections.
    • getUserName

      String getUserName()
      Returns:
      the username to use for MQTT connections.
    • getMaxReconnectDelay

      Long getMaxReconnectDelay()
      Returns:
      the maximal delay for reconnecting.
    • getKeepAliveInterval

      Integer getKeepAliveInterval()
      Returns:
      the keep alive interval.
    • isAutomaticReconnect

      boolean isAutomaticReconnect()
      Returns:
      true is automatic reconnect should be performed.
    • getCustomWebSocketHeaders

      Map<String,String> getCustomWebSocketHeaders()
      Returns:
      the custom headers that should be sent with web socket connections.
    • isHttpsHostnameVerificationEnabled

      boolean isHttpsHostnameVerificationEnabled()
      Returns:
      true if hostname verification should be used.
    • getSSLHostnameVerifier

      HostnameVerifier getSSLHostnameVerifier()
      Returns:
      the hostname verifier to use for hostname verification.
    • getWillMessage

      io.micronaut.mqtt.hivemq.config.MqttClientConfigurationProperties.WillMessage getWillMessage()
      Returns:
      the last will message that should be sent on ungraceful disconnects.
    • getCertificateConfiguration

      MqttCertificateConfiguration getCertificateConfiguration()
      Returns:
      the certificate configuration to use for SSL and mTLS.