Installation guide
61
CHAPTER 15
Configuring Message Server as a Standalone Node
delivery-mode’, then if the server receives any persistent messages, then it overrides the delivery
mode from persistent to non-persistent. If the policy is ‘throw exception’, then for each persistent
message that it receives, it will throw the exception indicating that the persistent messages are not
allowed when persistence is disabled.
You can specify the persistence store type by using the tag <persistence-type>, which accepts either
file-store or db-store.
Configuration for file-store:
<file-store>
<messages-dir>$NODES_DIR/jmsmessages</messages-dir>
<max-file-size-mb>10</max-file-size-mb>
<purge-interval-sec>600</purge-interval-sec>
</file-store>
You have to specify in which directory you want to store the messages. This can be specified in
multiple ways. You can either specify the absolute path of the directory, or you can specify
$NODES_DIR/, which stores the messages under server's nodes directory with the child directory
called messages or you can also specify it as $INSTALL_DIR/ which stores the messages under
installation directory with the child directory called messages.
The file, stores the actual message objects. You can configure the max-data-files size in kilo bytes. So,
if the first data file reaches to the configured max size, then it creates a new file and stores the data in
it. The messages in the file store are actually not removed from the file and should be deleted as
when required. There is a background thread which removes the messages as marked for deletion.
So, this thread will wake up at configured interval which you specified through <purge-interval-sec>.
Configuration for DB store:
<db-store>
<data-source-name>jmsdb</data-source-name>
<jms-table-name-prefix>pmt_</jms-table-name-prefix>
</db-store>
Database configuration requires a datasource name, which is bound as a resource in naming service.
For further details about how to configure the data source in resource-config.xml, check out the
Installation Guide.
You can specify the <jms-table-name-prefix> for the tables that the server is going to create in the
specified database. When the server starts up it automatically creates the required tables with the
given prefix. The default values are:
Table 18: Persistence Framework Default Values
Property Default Value
Persistence Enabled