Persistent Messages and Synchronous File Storage

When using file storage, 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 storage in the stores.conf file 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.

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 shared store files, see Managing Access to Shared Store Files.