Skip to main content

General

Export to MQTT

High-performance MQTT export with QoS support, TLS encryption, and in-memory reactive buffering.

High-performance export to generic MQTT brokers with QoS support, TLS encryption, and reactive buffering. Ideal for integrating with third-party brokers, cloud bridges, or local subscribers.

open_in_new

MQTT 5.0 Specification

OASIS MQTT standard

Configuration Parameters

ParameterRequiredTypeDefaultDescription
BrokerHostYesstringlocalhostThe hostname or IP address of the MQTT broker.
BrokerPortNoint1883The MQTT broker port (1883 default).
UsernameNostring(empty)Authentication username.
PasswordNostring(empty)Authentication password.
TopicNostringproxus_device_dataTarget MQTT topic.
QualityOfServiceLevelNostringAtLeastOnceQoS level: AtMostOnce, AtLeastOnce, or ExactlyOnce.
UseTlsNoboolfalseEnable TLS encryption.
TlsVersionNostringTls12TLS protocol version (if TLS is enabled).
TlsClientCertificateNostring(empty)Path to client certificate file (PFX/Cert).
TlsClientCertificatePasswordNostring(empty)Password for the client certificate.
MaxReconnectAttemptsNoint10Maximum reconnect attempts before giving up.
InitialReconnectDelayMsNoint1000Initial reconnect delay in milliseconds.
MaxReconnectDelayMsNoint30000Max reconnect delay in milliseconds.
MaxBatchSizeNoint50Max messages to group in one reactive batch.
MessageBatchTimeoutMsNoint500Max time to wait before flushing a partial batch.
HealthCheckIntervalSecNoint10Health check interval in seconds.
ConnectionTimeoutSecNoint5Connection timeout in seconds.

Internal Behavior

Resilience (Reactive Pipeline)

  • In-Memory Buffering: Uses a Reactive (R3) pipeline to buffer messages before sending.
  • Connection Management: Maintains a persistent connection with automatic reconnection.
  • Health Checks: Runs a periodic health check (default 10s) to verify connection status.

Performance Features

  • Buffered Serialization: Uses System.Text.Json with a reusable buffer to minimize allocations.
  • Batching: Messages are processed in micro-batches and published sequentially.