# JMS Producer

The JMS Producer step publishes messages in near real time to the Apache ActiveMQ Java Messaging Service (JMS) server or IBM MQ middleware.

You can use the JMS Producer step to define a transformation which publishes a [stream of records](/pdia-data-integration/extracting-data-into-pdi/streaming-analytics.md) to a JMS queue for every update of a warehouse. In turn, this queue could then launch another job that flushes an application cache.

![JMS Producer step](/files/jfP2XnDqHqgnJQ4AySjC)

### Before you begin

Before using the JMS Producer step, be aware of the following conditions:

* You must be familiar with JMS messaging to use this step. Additionally, you must have a message broker, such as Apache ActiveMQ or IBM MQ, available before you configure this step.
* This step supports JMS 2.0 and requires [Apache ActiveMQ Artemis](https://activemq.apache.org/artemis/).
* If you need to use JMS 1.1 with ActiveMQ or Artemis, use the previous versions of the JMS Consumer and JMS Producer steps, also available in Pentaho version 8.1 and earlier.
* Place the IBM MQ client JAR for IBM MQ middleware in the following directories:

  * On the PDI client: `data-integration/plugins/pentaho-streaming-jms-plugin/lib`
  * On the Pentaho Server: `server/pentaho-server/pentaho-solutions/system/karaf/deploy`

  You need to locate the Websphere MQ classes for the JMS Java library from your IBM Websphere MQ installation. You can also find the library in your [IBM Websphere MQ Client SupportPac](https://idaas.iam.ibm.com/idaas/mtfim/sps/authsvc?PolicyId=urn:ibm:security:authentication:asf:basicldapuser). The Websphere MQ Java library version that the PDI plugin steps were built against is 9.4.0.0. The library that you must have available for distribution into the PDI JMS plugin is `com.ibm.mq.allclient-9.4.0.0.jar`. Because IBM licensing prevents us from distributing this library directly, you must add it to your PDI directories.
* Place the JMS library JAR for the `ConnectionFactory` and other supporting classes in the following directories:
  * On the PDI client: `data-integration/plugins/pentaho-streaming-jms-plugin/lib`
  * On the Pentaho Server: `server/pentaho-server/pentaho-solutions/system/karaf/deploy`
* Set the OPT environment variable for your operating system.
  * **Linux or Unix**
    1. In a text editor, open the `...\data-integration\spoon.sh` file.
    2. Locate the line that defines the `OPT` variable:

       ```bat
       OPT="$OPT $PENTAHO_DI_JAVA_OPTIONS
       ```
    3. Append the following JVM option to the end of that line:&#x20;

       ```shellscript
       -Dcom.ibm.mq.cfg.useIBMCipherMappings=false
       ```
    4. Save and close the `...\data-integration\spoon.sh` file.
  * **Windows**
    1. In a text editor, open the `...\data-integration\Spoon.bat` file.
    2. Locate the line that defines the `OPT` variable:

       ```bat
       set OPT=%OPT% %PENTAHO_DI_JAVA_OPTIONS%
       ```
    3. Append the following JVM option to the end of that line:

       ```batch
       "-Dcom.ibm.mq.cfg.useIBMCipherMappings=false"
       ```
    4. Save and close the `...\data-integration\Spoon.bat` file.

### Step name

* **Step name**: Specifies the unique name of the step on the canvas. Default: `JMS Producer`.

### Options

The JMS Producer step includes the following tabs.

* **Setup**
* **Security**
* **Options**
* **Properties**

#### Setup tab

In this tab, define the connection, destination type, and destination name.

| Option               | Description                                                                                                                                                                                                                                                                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **IBM MQ**           | Select this connection type if you are using IBM MQ as your message broker.                                                                                                                                                                                                                                                                                               |
| **Active MQ**        | Select this connection type if you are using Apache ActiveMQ Artemis and JMS 2.0 as your message broker.                                                                                                                                                                                                                                                                  |
| **JMS URL**          | Enter the broker URL for the selected connection type.                                                                                                                                                                                                                                                                                                                    |
| **Destination type** | <p>Select <strong>Topic</strong> or <strong>Queue</strong> to specify the delivery model you want to use:</p><ul><li><strong>Topic</strong>: publish/subscribe model where one message can be delivered to multiple consumers.</li><li><strong>Queue</strong>: point-to-point model where one message is delivered from a single producer to a single consumer.</li></ul> |
| **Destination name** | Specify the name of the topic or queue.                                                                                                                                                                                                                                                                                                                                   |
| **Receive timeout**  | Specify the time to wait for incoming messages (in milliseconds). A timeout setting of `0` never expires.                                                                                                                                                                                                                                                                 |

#### Security tab

![Security tab in JMS Producer](/files/GiZRZ8iO2gZiT9TrFiaJ)

Use this tab to define authentication and SSL settings.

| Option                          | Description                                                                                                                                                    |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Username**                    | Specify the user name required to access the Active MQ or IBM MQ server.                                                                                       |
| **Password**                    | Specify the password associated with the user name.                                                                                                            |
| **Use secure protocol**         | Select to secure the message stream with the Secure Socket Layer (SSL) protocol. You can adjust the settings of the protocol through the SSL properties table. |
| **Use JVM default SSL context** | Select to inherit the default SSL properties from the JVM, instead of configuring them in the SSL properties table.                                            |

The following SSL values are available, depending on whether you use ActiveMQ or IBM MQ as the connection method for the step:

| Name                     | Value                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Ciphersuite**          | Specify a CipherSuite name. Values depend on the provider. For details, see <https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html>.                                                                                                                                                                                                                         |
| **Context Algorithm**    | Specify the name of the secure protocol you are using.                                                                                                                                                                                                                                                                                                                                   |
| **FIPS required**        | IBM MQ only: Specify `True` to enable support for the Federal Information Processing Standard (FIPS). Specify `False` if FIPS is not required.                                                                                                                                                                                                                                           |
| **Key Store Password**   | Specify the password for the key store object you want this secure connection to use.                                                                                                                                                                                                                                                                                                    |
| **Key Store Path**       | Specify the file path location of the key store you want this secure connection to use.                                                                                                                                                                                                                                                                                                  |
| **Key Store Type**       | IBM MQ only: Specify the format of the key store.                                                                                                                                                                                                                                                                                                                                        |
| **SSL Provider**         | <p>Active MQ only: Specify the SSL implementation you want to use, either JDK or OpenSSL.</p><p>If you specify OpenSSL, you must provide the OpenSSL libraries. For details, see the ActiveMQ documentation: <a href="https://activemq.apache.org/artemis/docs/latest/configuring-transports.html"><https://activemq.apache.org/artemis/docs/latest/configuring-transports.html></a></p> |
| **Trust Store Password** | IBM MQ only: Specify the password for the trust store object you want this secure connection to use.                                                                                                                                                                                                                                                                                     |
| **Trust All**            | Active MQ only: Specify `True` or `False`. `False` is recommended. Specify `True` only if you want this connection to trust all certificates without validation.                                                                                                                                                                                                                         |
| **Trust Store Path**     | Specify the file path location of the trust store certificates you want this secure connection to use.                                                                                                                                                                                                                                                                                   |
| **Trust Store Type**     | IBM MQ only: Specify the format of the trust store.                                                                                                                                                                                                                                                                                                                                      |
| **Verify Host**          | Active MQ only: Specify `True` to verify that the host server name matches its certificate. Specify `False` to omit host verification.                                                                                                                                                                                                                                                   |

#### Options tab

![Options tab](/files/fQNKT715naG5uyLCuyLn)

Use this tab to configure JMS message options.

| Option                        | Valid value                                                                              |
| ----------------------------- | ---------------------------------------------------------------------------------------- |
| **Disable Message ID**        | `true` or `false`                                                                        |
| **Disable Message Timestamp** | `true` or `false`                                                                        |
| **Delivery Mode**             | Integer (example: `1`)                                                                   |
| **Priority**                  | Integer between `0` and `9` (example: `2`)                                               |
| **Time to Live**              | Integer (example: `4`). This value must be greater than the value of **Delivery Delay**. |
| **Delivery Delay**            | Integer (example: `2`)                                                                   |
| **JMS Correlation ID**        | Any ID (example: `Vantara`)                                                              |
| **JMS Type**                  | `Active MQ` or `IBM MQ`                                                                  |

#### Properties tab

Use this tab to set additional properties for your connection type.

![Properties tab](/files/ximJga0KkIaZMweLUlF2)

### Metadata injection support

This step supports metadata injection. You can use it with [ETL metadata injection](/pdia-data-integration/pdi-transformation-steps-reference-overview/etl-metadata-injection.md) to pass metadata to your transformation at runtime.

### See also

* [JMS Consumer](/pdia-data-integration/pdi-transformation-steps-reference-overview/jms-consumer.md)


---

# 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.pentaho.com/pdia-data-integration/pdi-transformation-steps-reference-overview/jms-producer.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.
