# Write

The **Write** function writes a message to a specified queue on an IBM MQ server.

***

## Properties

### Queue

#### Host name

The host name or IP address of the IBM MQ server. This is a mandatory field.

#### Port

The port number the IBM MQ server listens on. The default port is 1414.

#### Queue manager

The name of the IBM MQ queue manager to connect to. This is a mandatory field.

#### Channel

The server-connection channel used to connect to the queue manager. This is a mandatory field.

#### Queue name

The name of the MQ queue to write to. This is a mandatory field.

***

### Security

#### Username

The username for authentication. This is a mandatory field.

#### Password

The password for authentication. This is a mandatory field.

#### Domain

The Windows domain for authentication. Leave blank if not required.

***

### Data

#### Message

The content of the message to write to the queue.

#### Custom headers

A list of custom application headers to include with the message. Each header consists of:

* **Name**: The header name. Must start with a letter or underscore and contain only letters, digits, underscores, or periods.
* **Value**: The header value.

***

### Persistence

Specifies whether the message persists through queue manager restarts.

1. **NOT\_PERSISTENT**\
   The message is not persisted and may be lost if the queue manager restarts.
2. **PERSISTENT**\
   The message is persisted and survives queue manager restarts.
3. **PERSISTENT\_AS\_QUEUE\_DEF** (default)\
   The persistence is determined by the queue's default configuration.

***

### Character set

The character encoding used to encode the message body.

1. **IBM037**
2. **ISO\_8859\_1\_Latin1\_IBM819** (default)
3. **IBM850**
4. **Unicode**
5. **UTF**

***

### Encoding

Specifies the numeric encoding of the message. Match these settings to the encoding of the destination system.

#### Binary encoding

1. **INTEGER\_UNDEFINED**\
   Encoding is unspecified; the queue manager's default is used.
2. **INTEGER\_NORMAL**\
   Big-endian integer encoding, typical of AIX and POWER-based systems.
3. **INTEGER\_REVERSED** (default)\
   Little-endian integer encoding, typical of Windows and x86-based systems.

#### Decimal encoding

1. **DECIMAL\_UNDEFINED**\
   Encoding is unspecified; the queue manager's default is used.
2. **DECIMAL\_NORMAL**\
   Big-endian packed decimal encoding.
3. **DECIMAL\_REVERSED** (default)\
   Little-endian packed decimal encoding.

#### Floating point encoding

1. **FLOAT\_UNDEFINED**\
   Encoding is unspecified; the queue manager's default is used.
2. **IEEE\_NORMAL**\
   IEEE 754 big-endian floating point encoding.
3. **IEEE\_REVERSED** (default)\
   IEEE 754 little-endian floating point encoding.
4. **S390**\
   IBM System/390 mainframe floating point encoding.

***

### Options

#### Correlation Id

An identifier used to correlate messages. This value is attached to the outgoing message so that consumers can filter for it. Maximum length is 24 characters.

***

### Request Signing (Certificate)

#### Sign with certificate

Select to enable TLS/SSL certificate authentication when connecting to the IBM MQ server.

When enabled, the following properties are displayed:

**Certificate path**:

The path to the X.509 client certificate file (.pfx).

**Certificate password**:

The password for the certificate.

**Peer name**:

The subject distinguished name (DN) of the server's certificate, used to verify the server's identity. The following fields are available:

* **Country**
* **Organization**
* **Organizational unit**
* **Common name**
* **State or province**
* **Locality**
* **Email address**
* **User identifier**

**Cipher specification**:

The cipher specification for the TLS connection. Must match the `SSLCIPH` value configured on the server-connection channel of the IBM MQ queue manager.

1. **TLS\_RSA\_WITH\_AES\_256\_CBC\_SHA256** (default)
2. **ECDHE\_RSA\_AES\_256\_GCM\_SHA384**

***

## Links

[IBM MQ documentation](https://www.ibm.com/docs/en/ibm-mq)
