Path: redb-route/redb.Route.MqttNet/MqttHeaders.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.MqttNet/MqttHeaders.cs
----
namespace redb.Route.MqttNet;
///
/// Constants for exchange headers set by the MQTT component.
/// All prefixed with "redbMqtt." to avoid collisions with other connectors.
///
public static class MqttHeaders
{
/// Common prefix for all MQTT headers.
public const string Prefix = "redbMqtt.";
// ── Topic ─────────────────────────────────────────────────────────
///
/// Topic the message was received on (consumer) or sent to (producer). Informational: the connector writes it, a
/// publish never reads it. To publish elsewhere than the endpoint's topic, set .
///
public const string Topic = "redbMqtt.topic";
///
/// Topic a publish goes to instead of the endpoint's topic, set by the route. The connector never writes it, so a
/// received topic or an earlier publish cannot steer the next one (Apache Camel keeps CamelMqttTopic and
/// CamelPahoOverrideTopic apart the same way).
///
public const string OverrideTopic = "redbMqtt.overrideTopic";
///
/// QoS level of the received or published message. Informational: the connector writes it, a publish never reads
/// it. To publish with another QoS than the endpoint's, set .
///
public const string Qos = "redbMqtt.qos";
///
/// QoS level (an , 0 to 2) a publish uses instead of the endpoint's, set by the route. The connector
/// never writes it, so the QoS of a received message does not carry over to a republish.
///
public const string OverrideQos = "redbMqtt.overrideQos";
///
/// Whether the received or published message had the retain flag set. Informational: the connector writes it, a
/// publish never reads it. To set the retain flag of a publish, set .
///
public const string Retain = "redbMqtt.retain";
///
/// Retain flag (a ) a publish uses instead of the endpoint's, set by the route. The connector never
/// writes it, so a retained message received and republished is not retained again unless the route asks for it.
///
public const string OverrideRetain = "redbMqtt.overrideRetain";
// ── Payload ───────────────────────────────────────────────────────
/// MQTT payload content type (MQTT 5.0).
public const string ContentType = "redbMqtt.contentType";
/// Response topic (MQTT 5.0 request/response).
public const string ResponseTopic = "redbMqtt.responseTopic";
/// Correlation data (MQTT 5.0 request/response).
public const string CorrelationData = "redbMqtt.correlationData";
/// Message expiry interval in seconds (MQTT 5.0).
public const string MessageExpiryInterval = "redbMqtt.messageExpiryInterval";
// ── Connection ────────────────────────────────────────────────────
/// Broker name used for the connection.
public const string Broker = "redbMqtt.broker";
/// Client ID of the MQTT connection.
public const string ClientId = "redbMqtt.clientId";
// ── MQTT 5.0 User Properties ──────────────────────────────────────
/// MQTT 5.0 User Properties as Dictionary<string,string>.
public const string UserProperties = "redbMqtt.userProperties";
}