Package de.smartsquare.starter.mqtt
Class MqttProperties
-
- All Implemented Interfaces:
@Validated()@ConfigurationProperties(prefix = "mqtt") public final class MqttPropertiesProperties for connection to the mqtt broker.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumMqttProperties.MqttShutdownConfiguration for shutting a mqtt processor.
-
Field Summary
Fields Modifier and Type Field Description private final Stringhostprivate final Integerportprivate final StringclientIdprivate final Stringusernameprivate final Stringpasswordprivate final Booleansslprivate final Booleancleanprivate final Stringgroupprivate final Integerversionprivate final LongconnectTimeoutprivate final MqttProperties.MqttShutdownshutdownprivate final LongsessionExpiry
-
Method Summary
Modifier and Type Method Description final StringgetHost()The host the mqtt broker is available under. final IntegergetPort()The port the mqtt broker is available under. final StringgetClientId()The client id this component should connect with. final StringgetUsername()The username this component should connect with. final StringgetPassword()The password this component should connect with. final BooleangetSsl()If ssl should be used for the connection to the mqtt broker. final BooleangetClean()If the client should connect with a clean session. final StringgetGroup()The optional group subscriptions should be prefixed with. final IntegergetVersion()The mqtt protocol version to use. final LonggetConnectTimeout()The timeout for connection to the broker in milliseconds. final MqttProperties.MqttShutdowngetShutdown()The shutdown configuration for the mqtt processor. final LonggetSessionExpiry()The session expiry interval in seconds. -
-
Method Detail
-
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.
-
getVersion
final Integer getVersion()
The mqtt protocol version to use.
-
getConnectTimeout
final Long getConnectTimeout()
The timeout for connection to the broker in milliseconds.
-
getShutdown
final MqttProperties.MqttShutdown getShutdown()
The shutdown configuration for the mqtt processor.
-
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.
-
-
-
-