> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IBM MQ Connector

> Connect Arc to IBM MQ queues through the REST API to send and receive enterprise messages.

The IBM MQ connector provides access to IBM MQ queues through the REST API.

## Key Capabilities

* Enterprise message queuing through IBM MQ REST API integration
* Queue manager connectivity with TLS encryption support
* Bidirectional message processing with configurable authentication
* Automatic retry logic with configurable intervals and maximum attempts

## Overview

IBM MQ connectors are configured with a specific queue to which messages are pushed or from which messages are retrieved. Files that arrive in the **Transactions** tab of the connector are pushed as a message to the queue, and messages pulled from the queue are written as files to the **Transactions** tab. Each connector instance can only be configured with a single queue.

## Prerequisites

To establish a connection with IBM MQ, at a minimum users must have:

* An IBM MQ server and a clear network path to that server from Arc

* A queue manager with at least one active queue

> [!NOTE]
>
> CData does not provide setup assistance or support for the creation or configuration of the IBM MQ server. For questions about the setup of an IBM MQ server, consult the [Introduction to IBM MQ](https://www.ibm.com/docs/en/ibm-mq/9.4?topic=mq-introduction) documentation.

## Connector Configuration

This section contains all of the configurable connector properties.

### Settings Tab

#### Configuration

*Settings related to the core configuration of the connector.*

| Setting | Description |
| - | - |
| **Connector Id** | The static, unique identifier for the connector. |
| **Connector Type** | Displays the connector name and a description of what it does. |
| **Connector Description** | An optional field to provide a free-form description of the connector and its role in the flow. |
| **Remote Host** | The hostname or IP address of the system hosting the MQ service. |
| **Remote Port** | The port on the remote host where the MQ service is listening. |
| **Queue Manager** | The name of the local queue manager for the desired queue. |
| **Queue** | The name of the queue to push messages to or pull messages from. |

#### TLS Settings

*Settings related to transport security.*

| Setting | Description |
| - | - |
| **Use TLS when connecting with IBM MQ servers** | Whether to use TLS encryption as transport security when connecting and communicating with IBM MQ servers. When disabled, all communication is in plain text. |
| **Server Public Certificate** | When TLS is enabled, set this field to the TLS/SSL certificate that the IBM MQ presents to verify its identity. Set this to **Any Certificate** to implicitly trust the IBM MQ server. |

#### Client Authentication

*Settings related to authenticating against the remote service.*

| Setting | Description |
| - | - |
| **Username** | The username credential for authenticating against the remote server. |
| **Password** | The password for the specified username. |

#### Other Settings

*Settings not included in the previous categories.*

| Setting | Description |
| - | - |
| **Local File Scheme** | A scheme for assigning filenames to messages that are output by the connector. You can use macros in your filenames dynamically to include information such as identifiers and timestamps. For more information, see [Macros](#macros). |

### Advanced Tab

#### Message

*Message settings determine how the connector searches for messages and manages them after processing.*

**Note:** The settings below are deprecated and hidden by default. They appear only on connectors where they were previously enabled or configured to a non-default value. To retain copies of successfully processed files, right-click the connector in the flow, choose **Show Success Path**, and connect the success path to a [File connector](https://docs.arc.cdata.com/26.4/self-hosted/en/connectors/file.md).

<table><thead><tr><th>Setting</th><th>Description</th></tr></thead>
<tbody><tr><td>**Save to Sent Folder** (Deprecated)</td>
<td>Copies files processed by the connector to the Sent folder. Disabled by default. Files saved to the Sent folder are not covered by [Encryption at Rest](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/encryption-at-rest.md).</td></tr>
<tr><td>**Sent Folder Scheme** (Deprecated)</td>
<td>Groups files in the **Sent** folder by the selected time interval. Only relevant when **Save to Sent Folder** is enabled.</td></tr></tbody></table>

#### Logging

*Settings that govern the creation and storage of logs.*

<table><thead><tr><th>Setting</th>
<th>Description</th></tr></thead>
<tbody><tr><td>**Log Level**</td>
<td>The verbosity of logs generated by the connector. When you request support, set this to **Debug**.</td></tr>
<tr><td>**Log Subfolder Scheme**</td>
<td>Instructs the connector to group files in the Logs folder according to the selected interval. The **Weekly** option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance.</td></tr>
<tr><td>**Log Messages**</td>
<td>Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the **Transactions** tab.</td></tr></tbody></table>

#### Other Settings

| Setting | Description |
| - | - |
| **Processing Delay** | The amount of time (in seconds) by which the processing of files placed in the **Transactions** tab is delayed. This is a legacy setting. Best practice is to [use a File connector](https://docs.arc.cdata.com/26.4/self-hosted/en/flows/designing-a-flow.md#interacting-with-the-local-file-system) to manage local file systems instead of this setting. |

#### Miscellaneous

*Miscellaneous settings are for specific use cases.*

<table><thead><tr><th>Setting</th>
<th>Description</th></tr></thead>
<tbody><tr><td>**Other Settings**</td>
<td>Enables you to configure hidden connector settings in a semicolon-separated list (for example, `setting1=value1;setting2=value2`). Normal connector use cases and functionality should not require the use of these settings.</td></tr></tbody></table>

### Automation Tab

#### Automation Settings

*Settings related to the automatic processing of files by the connector.*

| Setting | Description |
| - | - |
| **Send** | Whether files arriving at the connector are automatically sent. |
| **Retry Interval** | The number of minutes before a failed send is retried. |
| **Max Attempts** | The maximum number of times the connector processes the file. Success is measured based on a successful server acknowledgement. If you set this to 0, the connector retries the file indefinitely. |
| **Receive** | Whether the connector should automatically query the data source. |
| **Interval** | The interval between automatic query attempts. |
| **Minutes Past the Hour** | The minutes offset for an hourly schedule. Only applicable when the interval setting above is set to *Hourly*. For example, if this value is set to 5, the automation service downloads at 1:05, 2:05, 3:05, etc. |
| **Time** | The time of day that the attempt should occur. Only applicable when the interval setting above is set to *Daily*, *Weekly*, or *Monthly*. |
| **Day** | The day on which the attempt should occur. Only applicable when the interval setting above is set to *Weekly* or *Monthly*. |
| **Minutes** | The number of minutes to wait before attempting the download. Only applicable when the interval setting above is set to *Minute*. |
| **Cron Expression** | A five-position string representing a cron expression that determines when the attempt should occur. Only applicable when the interval setting above is set to *Advanced*. |
| **Start Date and Time** | The date and time at which the automation first runs. Every run after that follows the interval setting above. The last and next run times appear in the [Automation Status](#automation-status) section. |

#### Automation Status

*A read-only summary of whether the automation is running, what happened on the last run, and when the next run occurs.*

The **Automation Status** card appears under the **Enabled** checkbox on the **Automation** tab for **Receive**, **Download**, and **Scheduled Send** automation. The card answers three questions: whether the automation ran, whether the run worked, and when the next run occurs.

The card updates as you change the **Enabled** checkbox, or the **Interval** or **Start Date and Time** settings, before you save the connector.

![The Automation Status card on the Automation tab showing a Suspended status, a Failed last processed result, and the next run time](https://docs.arc.cdata.com/26.4/images/automation-status-card.png)

Status

The current state of the automation for the connector.

<table><thead><tr><th>Status</th>
<th>Description</th></tr></thead>
<tbody><tr><td>**In Progress**</td>
<td>A run is executing now, or another instance has locked the scheduled slot.</td></tr>
<tr><td>**Idle**</td>
<td>The automation is waiting for the next scheduled run.</td></tr>
<tr><td>**Suspended**</td>
<td>The connector is in a [backoff](https://docs.arc.cdata.com/26.4/self-hosted/en/connectors/connector-backoff.md) state after repeated failed runs, and the automation service is skipping it.</td></tr>
<tr><td>**Disabled**</td>
<td>The automation is turned off for the connector.</td></tr></tbody></table>

Last Run Time

The outcome of the most recent run.

<table><thead><tr><th>Field</th>
<th>Description</th></tr></thead>
<tbody><tr><td>**Date**</td>
<td>The scheduled time of the last run.</td></tr>
<tr><td>**Last Processed Start**</td>
<td>The time the connector actually started processing the last run. This can be slightly later than the scheduled time.</td></tr>
<tr><td>**Last Processed Result**</td>
<td>The outcome of the last run:
<ul><li>**Successful**: The run completed and processed data.</li>
<li>**No Data**: The run completed but there was nothing to process, such as a query that returned no rows.</li>
<li>**Failed**: The run did not complete.</li></ul></td></tr>
<tr><td>**Last Successful At**</td>
<td>The date and time of the most recent successful run. This field appears when the last run failed or returned no data, so you can see how long the connector has gone without a successful run.</td></tr></tbody></table>

Next Run Time

The **Date** field shows when the automation is scheduled to run next. It is blank when the automation is disabled.

View Details

The **Suspended** status, the **Failed** result, and the **No Data** result each include a **View Details** link that opens a dialog with the full message:

<ul><li>**Suspended**: Lists each instance that is in backoff, how many times it failed, and when the automation service resumes. See [Connector Backoff](https://docs.arc.cdata.com/26.4/self-hosted/en/connectors/connector-backoff.md) for how a connector exits this state.</li>
<li>**Failed**: Shows the error message from the last failed run.</li>
<li>**No Data**: Shows the message the connector reported, such as `0 rows returned`.</li></ul>

No Run Versus No Data

The card distinguishes a connector that has not run from one that ran and found nothing. If **Last Processed Result** is empty, the automation has not run yet, so check the **Next Run Time** and the schedule settings. If the result is **No Data**, the automation ran on schedule and the data source returned nothing, so check the source for new data.

Disabled Connectors

A disabled connector keeps its last run information, so you can still see when it last ran and what happened. Only the **Next Run Time** is cleared.

#### Performance

*Settings related to the allocation of resources to the connector.*

<table><thead><tr><th>Setting</th>
<th>Description</th></tr></thead>
<tbody><tr><td>**Max Workers**</td>
<td>The maximum number of worker threads consumed from the threadpool to process files on this connector. If set, this overrides the default setting on the [Performance Settings](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/performance-settings.md) portion of the [Advanced Settings](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/advanced-settings.md) page.</td></tr>
<tr><td>**Max Files**</td>
<td>The maximum number of files sent by each thread assigned to the connector. If set, this overrides the default setting on the [Performance Settings](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/performance-settings.md) portion of the [Advanced Settings](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/advanced-settings.md) page.</td></tr></tbody></table>

### Alerts Tab

*Settings related to configuring alerts.*

Before you can execute Service Level Agreements (SLAs), you need to set up email alerts for notifications. By default, Arc uses the global settings on the [Alerts](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/alerts.md) tab. To use other settings for this connector, toggle **Override global setting** on.

By default, error alerts are enabled, which means that emails are sent whenever there is an error. To turn them off, uncheck the **Enable** checkbox.

Enter a **Subject** (mandatory). Check **Allow ArcScript in Subject** to use ArcScript in the **Subject** field. When you select this, the **ArcScript Editor** button appears (![arcscript editor button](https://docs.arc.cdata.com/26.4/images/rest_arcscript_editor.png)).

Optionally, enter a comma-separated list of **Recipient** emails.

### SLAs Tab

*Settings related to configuring Service Level Agreements (SLAs).*

SLAs enable you to configure the volume you expect connectors in your flow to send or receive, and to set the time frame in which you expect that volume to be met. CData Arc sends emails to warn the user when an SLA is not met, and marks the SLA as *At Risk*, which means that if the SLA is not met soon, it will be marked as *Violated*. This gives the user an opportunity to step in and determine the reasons the SLA is not being met, and to take appropriate actions. If the SLA is still not met at the end of the at-risk time period, the SLA is marked as violated, and the user is notified again.

SLA transitions to *At Risk* or *Violated* are also written to the [application log](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/activity.md#application-logs), which means that Application Performance Monitoring (APM) and log-ingestion tools can also alert on them.

To define an SLA, toggle **Expected Volume** on, then click the **Settings** tab.

![SLA Empty](https://docs.arc.cdata.com/26.4/images/sla_empty.png)
<ul><li>If your connector has separate send and receive actions, use the radio buttons to specify which direction the SLA pertains to.</li>
<li>In the **Expect at least** portion of the window:
<ul><li>Set the minimum number of transactions you expect to be processed (the volume)</li>
<li>Use the **Every** fields to specify the time frame</li>
<li>Indicate when the SLA should go into effect. If you choose **Starting on**, complete the date and time fields.</li>
<li>Check the boxes for the days of the week that you want the SLA to be in effect. Use the dropdown to choose **Everyday** if necessary.</li></ul></li>
<li>In the **Set status to 'At Risk'** portion of the window, specify when the SLA should be marked as at risk.
<ul><li>By default, notifications are not sent until an SLA is in violation. To change that, check **Send an 'At Risk' notification**.</li></ul></li></ul>

The following example shows an SLA configured for a connector that expects to receive 1000 files every day Monday-Friday. An at-risk notification is sent 1 hour before the end of the time period if the 1000 files have not been received.

![SLA Configuration Example](https://docs.arc.cdata.com/26.4/images/sla_defined.png)

> [!NOTE]
>
> You can turn off SLA alerts if necessary. This can be useful during maintenance windows. Click **Settings** on the navbar, then navigate to **Alerts > General Alerts**. Click the tablet and pencil icon to edit, and uncheck the **SLA Alerts** setting.

## Establishing a Connection

The following settings are required to establish a connection:

* Remote Host
* Remote Port
* Queue Manager
* Queue

If client authentication is required, you must also set the following:

* Username
* Password

Use the **Test Connection** button to verify the connection to the server.

## Sending Messages

Files that arrive in the **Transactions** tab for the connector are pushed to the configured queue as a message. Files can arrive in this folder either by being placed there directly, or from another connector earlier in the [flow](https://docs.arc.cdata.com/26.4/self-hosted/en/flows/flows.md).

You need to set up multiple IBM MQ connectors to push messages to multiple queues. You can use a connector like the [Branch connector](https://docs.arc.cdata.com/26.4/self-hosted/en/connectors/branch.md) to route files to the appropriate IBM MQ connector.

## Receiving Messages

You can configure the IBM MQ connector to automatically poll the remote queue for messages to download. Use the **Receive Automation** and **Receive** settings on the [Automation tab](#automation-tab). When enabled, the connector waits for the specified interval before attempting to retrieve messages from the queue and pushing them to the Output folder.

If the IBM MQ connector is connected to other connectors in a flow, downloaded messages are automatically passed to the next connector. Otherwise, the messages remain in the Output folder.

## Macros

Using macros in file naming strategies can enhance organizational efficiency and contextual
understanding of data. By incorporating macros into filenames, you can dynamically include
relevant information such as identifiers, timestamps, and header information, providing
valuable context to each file.

CData Arc supports these macros, which all use the following syntax: `%Macro%`.

<table><thead><tr><th>Macro</th><th>Description</th></tr></thead>
<tbody><tr><td>ConnectorID</td><td>Evaluates to the ConnectorID of the connector.</td></tr>
<tr><td>ConnectorName</td><td>Evaluates to the name of the connector. Enables you to include the connection name in file names or paths: for example, to tag backup files by which database connection produced them.</td></tr>
<tr><td>Ext</td><td>Evaluates to the file extension of the file currently being processed by the connector.</td></tr>
<tr><td>Filename</td><td>Evaluates to the filename (extension included) of the file currently being processed by the connector.</td></tr>
<tr><td>FilenameNoExt</td><td>Evaluates to the filename (without the extension) of the file currently being processed by the connector.</td></tr>
<tr><td>MessageId</td><td>Evaluates to the MessageId of the message being output by the connector.</td></tr>
<tr><td>RegexFilename:*pattern*</td><td>Applies a RegEx pattern to the filename of the file currently being processed by the connector.</td></tr>
<tr><td>Header:*headername*</td><td>Evaluates to the value of a targeted header (`headername`) on the current message being processed by the connector.</td></tr>
<tr><td>LongDate</td><td>Evaluates to the current datetime of the system in long-handed format (for example, Wednesday, January 24, 2024).</td></tr>
<tr><td>ShortDate</td><td>Evaluates to the current datetime of the system in a yyyy-MM-dd format (for example, 2024-01-24).</td></tr>
<tr><td>DateFormat:*format*</td><td>Evaluates to the current datetime of the system in the specified format (`format`). See [Sample Date Formats](https://docs.arc.cdata.com/26.4/self-hosted/en/scripting/value-formatters/date-formatters.md#date-formats-with-literal-characters) for the available datetime formats.</td></tr>
<tr><td>Vault:*vaultitem*</td><td>Evaluates to the value of the specified vault item.</td></tr></tbody></table>

### Examples

Some macros, such as %Ext% and %ShortDate%, do not require an argument, but others do. All
macros that take an argument use the following syntax: `%Macro:argument%`

Here are some examples of the macros that take an argument:

<ul><li>%Header:headername%: Where `headername` is the name of a header on a message.</li>
<li>%Header:mycustomheader% resolves to the value of the `mycustomheader` header set on the input message.</li>
<li>%Header:ponum% resolves to the value of the `ponum` header set on the input message.</li>
<li>%RegexFilename:pattern%: Where `pattern` is a regex pattern. For example, `%RegexFilename:^([\w][A-Za-z]+)%` matches and resolves to the first word in the filename and is case insensitive (`test_file.xml` resolves to `test`).</li>
<li>%Vault:vaultitem%: Where `vaultitem` is the name of an item in the [vault](https://docs.arc.cdata.com/26.4/self-hosted/en/getting-started/administration/settings/global-settings-vault.md). For example, `%Vault:companyname%` resolves to the value of the `companyname` item stored in the vault.</li>
<li>%DateFormat:format%: Where `format` is an accepted date format (see [Sample Date Formats](https://docs.arc.cdata.com/26.4/self-hosted/en/scripting/value-formatters/date-formatters.md#sample-date-formats) for details). For example, `%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%` resolves to the date and timestamp on the file.</li></ul>

You can also create more sophisticated macros, as shown in the following examples:

<ul><li>Combining multiple macros in one filename: `%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%%EXT%`</li>
<li>Including text outside of the macro: `MyFile_%DateFormat:yyyy-MM-dd-HH-mm-ss-fff%`</li>
<li>Including text within the macro: `%DateFormat:'DateProcessed-'yyyy-MM-dd_'TimeProcessed-'HH-mm-ss%`</li></ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.