Class BrokerPersistence
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.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.ResourceManager.IotOperations.dll
Syntax
public class BrokerPersistence : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.IotOperations.Models.BrokerPersistence>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.IotOperations.Models.BrokerPersistence>
Constructors
BrokerPersistence(String)
Initializes a new instance of BrokerPersistence.
Declaration
public BrokerPersistence (string maxSize);
Parameters
|
System.String
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. |
Exceptions
|
System.ArgumentNullException
|
Properties
DynamicSettings
Client sets the specified user property key/value in the CONNECT/SUBSCRIBE/PUBLISH. Optionally, if the customer specifies a configurable user property, it will work to enable persistence dynamically. The default user property key is 'aio-persistence' and value 'true'.
Declaration
public Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings DynamicSettings { get; set; }
Property Value
|
BrokerPersistenceDynamicSettings
|
EncryptionMode
Determines if encryption is enabled.
Declaration
public Nullable<Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode> EncryptionMode { get; set; }
Property Value
|
System.Nullable<IotOperationsOperationalMode>
|
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.
Declaration
public string MaxSize { get; set; }
Property Value
|
System.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.
Declaration
public Azure.ResourceManager.IotOperations.Models.VolumeClaimSpec PersistentVolumeClaimSpec { get; set; }
Property Value
|
VolumeClaimSpec
|
Retain
Controls which topic's retained messages should be persisted to disk. Please note BrokerRetainMessagesPolicy is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include BrokerRetainMessagesCustomPolicy.
Declaration
public Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy Retain { get; set; }
Property Value
|
BrokerRetainMessagesPolicy
|
StateStore
Controls which keys should be persisted to disk for the state store. Please note BrokerStateStorePolicy is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include BrokerStateStoreCustomPolicy.
Declaration
public Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy StateStore { get; set; }
Property Value
|
BrokerStateStorePolicy
|
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. Please note BrokerSubscriberQueuePolicy is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include BrokerSubscriberQueueCustomPolicy.
Declaration
public Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy SubscriberQueue { get; set; }
Property Value
|
BrokerSubscriberQueuePolicy
|
Methods
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
Declaration
protected virtual void JsonModelWriteCore (System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.Text.Json.Utf8JsonWriter
writer
The JSON writer. |
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The client options for reading and writing models. |
Explicit Interface Implementations
IJsonModel<BrokerPersistence>.Create(Utf8JsonReader, ModelReaderWriterOptions)
Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.
Declaration
Azure.ResourceManager.IotOperations.Models.BrokerPersistence IJsonModel<BrokerPersistence>.Create (ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.Text.Json.Utf8JsonReader
reader
The System.Text.Json.Utf8JsonReader to read. |
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
|
BrokerPersistence
A |
Exceptions
|
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IJsonModel<BrokerPersistence>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
Writes the model to the provided System.Text.Json.Utf8JsonWriter.
Declaration
void IJsonModel<BrokerPersistence>.Write (System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.Text.Json.Utf8JsonWriter
writer
The System.Text.Json.Utf8JsonWriter to write into. |
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Exceptions
|
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IPersistableModel<BrokerPersistence>.Create(BinaryData, ModelReaderWriterOptions)
Converts the provided System.BinaryData into a model.
Declaration
Azure.ResourceManager.IotOperations.Models.BrokerPersistence IPersistableModel<BrokerPersistence>.Create (BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.BinaryData
data
The System.BinaryData to parse. |
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
|
BrokerPersistence
A |
Exceptions
|
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IPersistableModel<BrokerPersistence>.GetFormatFromOptions(ModelReaderWriterOptions)
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.
Declaration
string IPersistableModel<BrokerPersistence>.GetFormatFromOptions (System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to consider when serializing and deserializing the model. |
Returns
|
System.String
The format that the model uses when communicating with the service. |
IPersistableModel<BrokerPersistence>.Write(ModelReaderWriterOptions)
Writes the model into a System.BinaryData.
Declaration
BinaryData IPersistableModel<BrokerPersistence>.Write (System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
|
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
|
System.BinaryData
A binary representation of the written model. |
Exceptions
|
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |