ThingWorx Edge MicroServer (EMS) > Additional Configuration of EMS > Storing Messages Received While EMS is Offline
Storing Messages Received While EMS is Offline
The offline_msg_store group is used to configure how the EMS handles and stores messages that are received while it is offline.
The following example shows the default configuration. If you want to use it as is, you do not have to change the configuration. When this feature is disabled, the other settings are ignored. However, if you do want to use this store, make sure you set the enabled property to true and add the appropriate directory for storing messages. Depending on the space available on your system, you may also want to change the max_size property.

"offline_msg_store": {
"enabled": true,
"directory" : "./offline_message_store",
"max_size": 65535
"blocking": false
},
The following table describes the properties for storing messages that are received while the EMS is offline; it also provides the default values:
Property
Description
enabled
Whether or not the store is enabled.
The default setting of true enables offline message store. Set this property to false to disable it.
directory
The path to the directory of the store where messages are stored.
The default value is "/path/to/offline/message/store/directory". Here is an example:
directory: "/opt/thingworx"
where "/opt/thingworx" is the directory where the EMS executable is installed (Linux).
max_size
The maximum size (in bytes) of the directory where messages are stored.
The default value is 65535 bytes.
blocking
Whether or not the offline message store blocking feature is enabled. The default setting is false, meaning that when the connection is restored, messages are flushed without confirming delivery.
When this property is set to true, EMS waits for delivery confirmation from the ThingWorx Platform before deleting messages from the offline store. Messages are retained until ThingWorx acknowledges receipt, which can cause the flushing of the message store to take longer.
For more information on the offline message store, see the "Enabling Reliable Offline Message Delivery" section of How to Configure Components of the C SDK in the ThingWorx Edge C SDK Help Center.
Was this helpful?