Choosing to use a file store for your messaging engine can have several advantages over using a data store.
To achieve best performance using a data store, you often need to use a separate remote database server. A file store can exceed the performance of a data store using a remote database server without needing a separate server.
The file store combines high throughput with little or no administration. This makes it suitable for those who do not want to worry about where the messaging engine is storing its recoverable data. A file store improves on the throughput, scalability, and resilience of Derby.
Use of data store might require database administration to configure and manage your messaging engines. File store can be used in environments without a database server.
As a managerial decision, some organizations prefer to use data store because it utilizes their existing resources more effectively. For example, this might be the case for a company with a strong team of database specialists, or a stable database infrastructure.
One technical advantage of using data store
is that some J2EE application can share JDBC connections to benefit
from one-phase commit optimization. For more information refer to Sharing connections to benefit from one-phase commit optimization. File store does not support
this optimization.
Both file store and data store offer high availability capabilities, for more details refer to Message store high availability considerations.