emqx/examples/retainer.conf.example

41 lines
1.3 KiB
Plaintext

##--------------------------------------------------------------------
## Retainer
##
## Configuration related to handling PUBLISH packets with a retain flag set to 1
##--------------------------------------------------------------------
## Note: This is an example of how to configure this feature
## you should copy and paste the below data into the emqx.conf for working
retainer {
## set to false to disable this
enable = true
## Message retention time. 0 means message will never be expired
msg_expiry_interval = 0s
## Periodic interval for cleaning up expired messages. Never clear if the value is 0
msg_clear_interval = 0s
## Maximum retained message size
max_payload_size = 1MB
## When the retained flag of the PUBLISH message is set and Payload is empty, whether to continue to publish the message
stop_publish_clear_msg = false
## Maximum retained messages delivery rate per session
deliver_rate = "1000/s"
## Retained messages store backend
backend {
## Backend type
type = built_in_database
## Specifies whether the messages are stored in RAM or persisted on disc
## Type: enum: ram | disc
storage_type = ram
## Maximum number of retained messages. 0 means no limit
max_retained_messages = 0
}
}