# Store Messages in Multiple Stores

The EMS server writes `PERSISTENT` messages to disk while waiting for confirmation of receipt from the subscriber. Messages are persisted to a store. The EMS server can write messages to different types of stores: file-based stores, mstores, and database stores.

By default, the EMS server writes persistent messages to file-based stores. There are three default store files, as described in Default Store Files. You can configure the system to change the default store files and locations, and also to store persistent messages to one or more store files, filtering them by destination. Stores are defined in the `stores.conf` configuration file, and associated with a destination using the `store` destination property.

Stores have properties that allow you to control how the server manages the store files. For example:

- When using file-based stores:
  - Preallocate disk space for the store file.
  - Truncate the file periodically to relinquish disk space.
  - Specify whether messages are written synchronously or asynchronously.
- Store messages in a database.

With the multiple stores feature, you can configure your messaging application to store messages in different locations for each application, or to create separate files for related destinations. For example, you can create one store for messages supporting Marketing, and one for messages supporting Sales. Because stores are configured in the server, they are transparent to clients.

The EMS Administration Tool allows administrators to review the system’s configured stores and their settings by using the `show stores` and `show store` commands.

Copyright © Cloud Software Group, Inc. All rights reserved.