# Metadata mapping for split file content

When splitting file contents into JMS messages, file metadata can be propagated as **JMS Headers** and **JMS Properties**.

A subset of **system metadata** can be automatically mapped to **JMS Properties**. **Custom metadata** can be mapped to **JMS Headers** and/or to **JMS Properties**.

## Mapping system metadata to JMS Properties

This subset of **system metadata** can be automatically mapped to **JMS Properties**:

* DFIID, Filename, Virtual Path, VFS

To map system metadata to **JMS Properties**, when configuring the output contract action, set the PropagatesDataOneMetadata toggle to on.

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

The DFIID, Filename, Virtual Path and VFS subset of **system metadata** will appear as **Properties** in the JMS provider.

## Mapping custom metadata to JMS Headers and/or Properties

**Custom metadata** can be mapped to **JMS Headers** and/or to **JMS Properties**.

To map metadata to **JMS Headers**, note that:&#x20;

* The file metadata name must be JMS\_header\_\<name>.
* \<name> must be one of the following:
  * JMSCorrelationId
  * JMSDeliveryMode
  * JMSDeliveryTime
  * JMSDestination
  * JMSExpiration
  * JMSMessageID
  * JMSPriority
  * JMSRedelivered
  * JMSReplyTo
  * JMSTimestamp
  * JMSType
* E.g., JMS\_header\_JMSCorrelationId = 1234 sets the JMSCorrelationId header to 1234

To map metadata to **JMS Properties**, note that:

* The file metadata name must be JMS\_property\_\<customName>
* E.g., JMS\_property\_orderId = 1234

To set custom metadata to **JMS Headers** and/or **JMS Properties**, a **specific workflow** must be designed and a **Mediation contract** must be set to use the workflow.

The workflow must have as many **Set Metadata** service tasks as the metadata that will be associated with the file and with queue messages.

<figure><img src="/files/vHMYg0rm8yzV3k0T7V1p" alt="" width="563"><figcaption></figcaption></figure>

In the workflow above, the SetJMSCorrIdMetadata service task sets the JMS\_header\_\<name> metadata where \<name> must be one of the options listed above.

The SetJMSCorrIdMetadata service task shown above is configured as follows:

* Name \[String]: JMS\_header\_JMSCorrelationId
* Value \[String]: correlationID

The SetJMSOrderMetadata service task sets the JMS\_property\_\<customName> custom metadata and is configured as follows:

* Name \[String]: JMS\_property\_order
* Value \[String]: 1234

Custom metadata will appear as **Headers** and **Properties** in the relevant sections of the JMS provider.&#x20;


---

# 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/split-file-contents-into-jms-messages/metadata-mapping-for-split-file-content.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.
