Skip to main content

spin_factor_outbound_mqtt/
runtime_config.rs

1pub mod spin;
2
3/// Runtime configuration for outbound MQTT.
4#[derive(Debug, Default)]
5pub struct RuntimeConfig {
6    /// Maximum allowed payload size in bytes for outbound MQTT publishes.
7    ///
8    /// When `None` (the default), no limit is enforced. Operators in multi-tenant deployments
9    /// should set this to prevent tenants from sending excessively large payloads.
10    /// Configure via `[outbound_mqtt] max_payload_size_bytes` in the runtime config TOML.
11    pub max_payload_size_bytes: Option<usize>,
12    /// If set, limits the number of concurrent outbound MQTT connections.
13    ///
14    /// When `None` (the default), no limit is enforced. Operators in multi-tenant deployments
15    /// should set this to prevent tenants from exhausting connection resources.
16    pub max_connections: Option<usize>,
17    /// If set, limits how long `acquire` will wait for a connection permit.
18    pub wait_timeout: Option<std::time::Duration>,
19}