> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/event-connectors/adding-a-new-event-connector.md).

# Adding a new event connector

## Introduction

When adding a new event connector, you step through a guided three-stage setup:

1. **Settings** - name, description, host, port, protocol and authentication method
2. **Authentication** - credentials for your broker, with a **test connection** check before you continue
3. **Queues/Topics** - the queues/topics this connector should listen on

The settings and queues stages are the same for every protocol. The authentication stage differs depending on whether you selected **AMQP 0-9-1** or **IBM MQ**, so both are covered below.

## Need to know

* New event connectors are available for selection as **brokers** in process flow [trigger shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener.md) as soon as they are saved successfully.
* Event connector triggers only become active when the process flow is [deployed](/product-documentation/process-flows/building-process-flows/process-flow-versioning.md#deploying-a-draft-or-inactive-version) and [enabled](/product-documentation/process-flows/managing-process-flows/enabling-and-disabling-a-process-flow/enabling-and-disabling-a-process-flow-without-virtual-enviroments.md).
* ALL messages published to selected queues/topics are passed through to the process flow.

## The steps

**Step 1**\
Log into the Patchworks dashboard, then select **process flows** <mark style="color:red;">></mark> **event connectors** from the left-hand navigation menu.

**Step 2**\
Click the **add new event connector** button:

<div align="left" data-with-frame="true"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FWhvUQIhT7svV36TlyUMo%2Fmanage-event-connectors%20(1).png?alt=media&amp;token=a516a9ef-9533-423e-b18f-dedb79b97b81" alt=""><figcaption></figcaption></figure></div>

**Step 3**\
You're prompted to enter general settings for this connector:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FJEoePL4OXyoqVcdapbM6%2Fadd%20event%20connector%202.png?alt=media&amp;token=19bc21d8-57a3-4e79-8cb3-ac963918eaeb" alt="" width="563"><figcaption></figcaption></figure></div>

Use the table below as a guide:

| Setting               | Summary                                                                                                                                                                                                                                                    |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                  | Enter a name for the event connector, as it will identified throughout Patchworks.                                                                                                                                                                         |
| Description           | Enter a description for the event connector to provide a little more detail about its purpose.                                                                                                                                                             |
| Host                  | Enter the the address of the machine where your messaging broker (e.g. RabbitMQ) is running - typically this is an IP address or a domain name.                                                                                                            |
| Port                  | Enter the network port where RabbitMQ is listening for connections. RabbitMQ uses the AMQP (Advanced Message Queuing Protocol) for communication which, by default, listens on port `5672` for non-TLS connections and on port `5671` for TLS connections. |
| Protocol              | Select the appropriate protocol for your messaging broker.                                                                                                                                                                                                 |
| Authentication method | Currently, `basic auth` is supported.                                                                                                                                                                                                                      |

**Step 4**\
Click the **create** button.

**Step 5**\
Enter your authentication credentials for the message broker - in this case, username and password:

<div data-with-frame="true"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fj005kNhS31t1v96bsotv%2Fcredentials-amqp.png?alt=media&amp;token=f703b0f4-7338-4372-9319-981e8f072a0a" alt=""><figcaption></figcaption></figure></div>

**Step 6**\
Click the **Test Connection** button.

<div data-with-frame="true"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FJ5ud5xuje36l1dhuVYvL%2Ftest-connection-success.png?alt=media&amp;token=a4c765d5-531f-4944-b52b-6babcc765e4b" alt=""><figcaption></figcaption></figure></div>

**Step 7**\
Now you can select or add which message queue/topic to associate with this event connector:

<div data-with-frame="true"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FZH2KK5pYSEjjA2TTBbkp%2Fqueues-step.png?alt=media&amp;token=c086c0be-ba8b-41db-a906-80a32cf9da5e" alt=""><figcaption></figcaption></figure></div>

Any existing queues are listed for selection, or you can add new queues/topics.

{% hint style="info" %}
When you add a new queue/topic here, it is added to your message broker. You can add as many as you need - any queues/topics that you add will be available for selection when this event connector is selected as the **broker** in a process flow [trigger shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener.md).
{% endhint %}

**Step 8**\
Having added all required queues/topics, the event connector is ready to [use in process flows](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener.md).

## Related information

* [Trigger shape (event connector)](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener.md)
