Persistent Messages and Synchronous Storage

When using file-based stores, persistent messages received by the EMS server are by default written asynchronously to disk. This means that, when a producer sends a persistent message, the server does not wait for the write-to-disk operation to complete before returning control to the producer.

Should the server fail before completing the write-to-disk operation, the producer has no way of detecting the failure to persist the message and taking corrective action.

You can set the mode parameter to sync for a given file-based store to specify that persistent messages for the topic or queue be synchronously written to disk. When mode = sync, the persistent producer remains blocked until the server has completed the write-to-disk operation. This parameter is not relevant in the case of grid stores or FTL stores, where the disk access mode is specified by ActiveSpaces or FTL, respectively.

Each EMS server writes persistent messages to a store file. To prevent two servers from using the same store file, each server restricts access to its store file for the duration of the server process. For details on how EMS manages access to shared file-based stores, see Managing Access to Shared File-Based Stores.