BrokerPersistence interface
Disk persistence configuration.
When persistence is enabled, certain items (non-performance-critical data) selected for persistence will reside only on disk. Below are the affected items:
- Retained messages will be stored on disk only.
- WILL messages will be stored on disk only.
- DSS key/value pairs will be stored on disk only, except for performance-critical items like timed locks, which remain in both disk and memory for improved performance.
Optional. Everything is in-memory if not set. Note: if configured, all MQTT session states are written to disk.
Properties
| encryption | Controls settings related to encryption of the persistence database. Optional, defaults to enabling encryption. |
| max |
The max size of the message buffer on disk. If a PVC template is specified using persistentVolumeClaimSpec Then this size is used as the request and limit sizes of that template. If a PVC template isn't specified Then local-path provisioner is requested with this size limit. Required. |
| persistent |
Use the specified persistent volume claim template to mount a persistent volume. Same object as in diskBackedMessageBuffer, but with a limitation that access modes field must be set to If unset, a default PVC with default properties will be used. Among other things this PVC will use the cluster default storage class, which may or may not be using a local path provisioner. User is opting in to sub-optimal behavior if they leave this unset or set it without the storage class field, and their cluster default is not a local path class. |
| retain | Controls which topic's retained messages should be persisted to disk. |
| state |
Controls which keys should be persisted to disk for the state store. |
| subscriber |
Controls which subscriber message queues should be persisted to disk. Important: to facilitate reconnection, session state metadata are ALWAYS written to disk if any persistence setting is specified, even if this section isn't set. |
Property Details
encryption
Controls settings related to encryption of the persistence database. Optional, defaults to enabling encryption.
encryption?: BrokerPersistenceEncryption
Property Value
maxSize
The max size of the message buffer on disk. If a PVC template is specified using persistentVolumeClaimSpec Then this size is used as the request and limit sizes of that template. If a PVC template isn't specified Then local-path provisioner is requested with this size limit. Required.
maxSize: string
Property Value
string
persistentVolumeClaimSpec
Use the specified persistent volume claim template to mount a persistent volume. Same object as in diskBackedMessageBuffer, but with a limitation that access modes field must be set to ReadWriteOncePod.
If unset, a default PVC with default properties will be used. Among other things this PVC will use the cluster default storage class, which may or may not be using a local path provisioner. User is opting in to sub-optimal behavior if they leave this unset or set it without the storage class field, and their cluster default is not a local path class.
persistentVolumeClaimSpec?: VolumeClaimSpec
Property Value
retain
Controls which topic's retained messages should be persisted to disk.
retain?: BrokerRetainMessagesPolicyUnion
Property Value
stateStore
Controls which keys should be persisted to disk for the state store.
stateStore?: BrokerStateStorePolicyUnion
Property Value
subscriberQueue
Controls which subscriber message queues should be persisted to disk. Important: to facilitate reconnection, session state metadata are ALWAYS written to disk if any persistence setting is specified, even if this section isn't set.
subscriberQueue?: BrokerSubscriberQueuePolicyUnion