package scala_mqtt_wrapper
- Alphabetic
- Public
- Protected
Type Members
- class MqttClient extends AnyRef
MQTT client
- final case class MqttLoggingSettings(name: String = "", attributes: Attributes = Attributes.logLevels(
onElement = Logging.InfoLevel,
onFinish = Logging.InfoLevel,
onFailure = Logging.ErrorLevel,
)) extends Product with SerializableMQTT logging settings
MQTT logging settings
- name
name used in log messages
- attributes
attributes with log levels
- final case class MqttPublishMessage(payload: ByteString, topic: String, flags: ControlPacketFlags = PublishQoSFlags.QoSAtMostOnceDelivery) extends Product with Serializable
MQTT data to be published
MQTT data to be published
- payload
payload to be published
- topic
topic to which the payload will be published
- flags
MQTT flags
- final case class MqttReceivedMessage(payload: ByteString, topic: String, flags: ControlPacketFlags, packetId: Option[PacketId]) extends Product with Serializable
data received from the MQTT broker
data received from the MQTT broker
- payload
received payload
- topic
topic from which the payload was received
- flags
MQTT flags
- packetId
MQTT packet id
- final case class MqttSettings(host: String, port: Int, username: String = "", password: String = "", subscriptions: Seq[MqttTopic] = Seq.empty[MqttTopic], clientId: String = generateUuid.toString, sessionId: ByteString = ByteString(generateUuid.toString), connectFlags: ConnectFlags = ConnectFlags.CleanSession, restartMinBackoff: FiniteDuration = 1.seconds, restartMaxBackoff: FiniteDuration = 30.seconds, restartRandomFactor: Double = 0.2, maxRestarts: Int = -1, restartLogLevel: LogLevel = Logging.WarningLevel, commandMergeSinkPerProducerBufferSize: Int = 16, commandBroadcastSourceBufferSize: Int = 128, eventBroadcastSourceBufferSize: Int = 128, withEventBroadcastSourceBackpressure: Boolean = false, publishMergeSinkPerProducerBufferSize: Int = 32, commandQueueBufferSize: Int = 128) extends Product with Serializable
MQTT client settings
MQTT client settings
- host
MQTT host
- port
MQTT port
- username
MQTT username
- password
MQTT password
- subscriptions
MQTT topics to subscribe to
- clientId
MQTT client ID
- sessionId
MQTT session ID
- connectFlags
MQTT connect flags
- restartMinBackoff
MQTT restart minimum backoff
- restartMaxBackoff
MQTT restart maximum backoff
- restartRandomFactor
MQTT restart random factor, random delay is added based on this factor
- maxRestarts
MQTT maximum restarts, set to -1 for infinite restarts
- restartLogLevel
MQTT restart log level
- commandMergeSinkPerProducerBufferSize
buffer space used per producer for command sink merge hub
- commandBroadcastSourceBufferSize
MQTT commands broadcast buffer size, must be a power of 2
- eventBroadcastSourceBufferSize
MQTT events broadcast buffer size, must be a power of 2
- withEventBroadcastSourceBackpressure
if true, the event broadcast will store events in a buffer until there is demand and eventually apply backpressure on the MQTT session flow; if false, the events will be always consumed even if there is no external demand
- publishMergeSinkPerProducerBufferSize
buffer space used per producer for publish merge sink
- commandQueueBufferSize
MQTT command queue buffer size
- final case class MqttTopic(name: String, flags: ControlPacketFlags = SubscribeQoSFlags.QoSAtMostOnceDelivery) extends Product with Serializable
MQTT topic
MQTT topic
- name
topic name
- flags
MQTT flags
Value Members
- object MqttSink
- object MqttSource
- object PublishQoSFlags
- object SubscribeQoSFlags