# Aggregate JMS messages into files

The Message-to-File (M2F) process that aggregates JMS messages into files requires the following steps:

1. Verify the [Data Mover system requirements](/data-one-installation-manager/system-requirements/data-mover-system-requirements/data-mover-system-requirements.md).&#x20;
2. Configure Data Mover to use the required JMS provider, as described in the [How to... configure JMS client connection support via DOIM](/data-mover-1.21/how-to.../...-configure-jms-client-connection-support-via-doim.md) page.&#x20;
3. Configure the [JMS Client Connection](/data-mover-1.21/transfer-protocols-and-connectors/client-connections/client-connection-jms.md) within Data Mover to connect to the JMS provider and send each JMS message to the JMS destination.
4. Configure the [Message Processing Rule](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/message-processing-rules.md#aggregating-jms-messages-into-files) to define the strategy to aggregate multiple JMS messages into a single file. Aggregated files are created in the specified Virtual Path.
5. Configure the Input Contract, with an [onMessage](/data-mover-1.21/workflow-templates/system-workflow-templates/workflow-templates-for-input-contracts.md#trigger-type-onmessage) trigger and one or more actions. Note that unlike other contract actions, a message-to-file action (M2FAction) is not associated with a workflow template and does not execute workflows but a [Message Listener](/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/aggregate-jms-messages-into-files/message-listener.md) is activated for each action.&#x20;

### Naming convention

Aggregated files are named according to the following convention: jmsfile\<JobId>-\<date>-\<time>.dat, where:

* **jmsfile**: fixed prefix
* **JobId**: identifier of the associated transfer job
* **date**: format YYMMDD
* **time**: format HHMMSS
* **.dat**: fixed extension

Example: jmsfile-4007-250324-154648.dat

<figure><img src="/files/Dah0WfUSYavfJ3jkCCFu" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-mover-1.21/transfer-protocols-and-connectors/jms-connector/aggregate-jms-messages-into-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
