# AMQP Producer

The Advanced Message Queuing Protocol (AMQP) Producer step publishes a [stream](/pdia-data-integration/extracting-data-into-pdi/streaming-analytics.md) of AMQP messages to an AMQP 0-9-1 compatible broker.

### Before you begin

Before you use the AMQP Producer step, be aware of the following conditions:

* This step uses and requires the AMQP 0-9-1 messaging protocol.
* You must have an AMQP 0-9-1 compatible broker (such as [RabbitMQ](https://www.rabbitmq.com/)) available before you configure this step.
* Within a transformation, you can use only the [AMQP Consumer](/pdia-data-integration/pdi-transformation-steps-reference-overview/amqp-consumer.md) step to ingest messages from any AMQP producer or broker. The AMQP Producer step is not required.

### Step name

![AMQP Producer dialog box](/spaces/YwnJ6Fexn4LZwKRHghPK/files/uz8HpRlCpFXWW3Mvb2T1)

* **Step name**: Specify a unique name for the step on the canvas.

### Use with AMQP Consumer

If you use AMQP Producer with [AMQP Consumer](/pdia-data-integration/pdi-transformation-steps-reference-overview/amqp-consumer.md) (in the same transformation or in separate transformations), some settings must align.

In particular, make sure the producer and consumer use compatible values for:

* **Exchange name** (or both blank to use the default exchange)
* **Exchange type**
* **Routing key** (for `DIRECT` and `TOPIC` exchanges)
* **Headers** (for `HEADERS` exchanges)

### Options

The AMQP Producer step requires you to configure the **Setup** and **Security** tabs.

#### Setup tab

![AMQP Producer Setup tab](/spaces/YwnJ6Fexn4LZwKRHghPK/files/gqySBFtOsq3CaAqVINY3)

The **Setup** tab defines the broker connection and publish settings.

* **Connection**: The URI address of the AMQP broker that the step connects to.

  For details, see the RabbitMQ URI specification: <https://www.rabbitmq.com/uri-spec.html>.
* **Exchange name**: The exchange to publish messages to.
  * To use the *default exchange*, leave **Exchange name** blank and set **Exchange type** to `DIRECT`.
  * If you did not specify an exchange name in the [AMQP Consumer](/pdia-data-integration/pdi-transformation-steps-reference-overview/amqp-consumer.md) step, leave **Exchange name** blank here too.
* **Exchange type**: The exchange type pattern to use.
  * `DIRECT`: Routes messages to queues based on the message routing key.
  * *Default exchange*: To use the default exchange, leave **Exchange name** blank and set **Exchange type** to `DIRECT`.
  * `FANOUT`: Routes messages to all queues bound to the exchange. The routing key is ignored.
  * `TOPIC`: Routes messages to one or more queues based on routing key pattern matching.
  * `HEADERS`: Routes messages based on one or more message header key/value pairs.
* **Routing key**: Required when **Exchange type** is `DIRECT` or `TOPIC`.

  Select a retrieval method:

  * **Specify routing key**: Enter a specific routing key.
  * **Get data from field**: Select a field to use as the routing key.

  To use the default exchange configuration:

  1. Leave **Exchange name** blank.
  2. Set **Exchange type** to `DIRECT`.
  3. Set **Routing key** to the queue name used by the consumer. (The value must match the consumer’s **Queue name** setting.)
* **Headers**: Required when **Exchange type** is `HEADERS`.

  Select a retrieval method:

  * **Specify headers**: Enter the header **Name** and **Value**.
  * **Get data from field**: Select a field to retrieve the header **Name** and **Value**.
* **Message field**: The input field that contains the message to publish.

#### Security tab

![AMQP Producer Security tab](/spaces/YwnJ6Fexn4LZwKRHghPK/files/tUsYh3dRd6grY7G824lJ)

The **Security** tab defines authentication credentials and (optionally) SSL properties for the AMQP broker.

* **Username**: The user name required to access the AMQP broker.
* **Password**: The password associated with **Username**.
* **Use secure protocol**: Select to configure SSL properties for the connection.
* **SSL properties**:
  * **Context Algorithm**: The secure protocol name.
  * **Key Store Password**: The password for the keystore.
  * **Key Store Path**: The path to the keystore.
  * **Key Store Type**: The keystore type.
  * **Trust Store Password**: The password for the truststore.
  * **Trust Store Path**: The path to the truststore.
  * **Trust Store Type**: The truststore format.

### See also

* [AMQP Consumer](/pdia-data-integration/pdi-transformation-steps-reference-overview/amqp-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/amqp-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.
