# Adding a new event connector

## Introduction

When adding a new event connector, you step through a series of wizard-type pages to add general settings, authentication credentials, and required queues/topics.

## Need to know

* New event connectors are available for selection as **brokers** in process flow [trigger shapes](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener) as soon as they are saved successfully.
* Event connector triggers only become active when the process flow is [deployed](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-versioning#deploying-a-draft-or-inactive-version) and [enabled](https://doc.wearepatchworks.com/product-documentation/process-flows/managing-process-flows/enabling-and-disabling-a-process-flow/enabling-and-disabling-a-process-flow-without-virtual-enviroments).
* 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"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fh7AgVYTIOYkkdGjNlHUU%2Fadd%20event%20connector%201.png?alt=media&#x26;token=3acd8fe9-c8f7-471b-a716-06dceb4a006b" 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&#x26;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 align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FncsuGXafEikp6u4kcOkT%2Fadd%20event%20connector%203.png?alt=media&#x26;token=634d4508-855c-411e-b317-34f5392ef860" alt="" width="563"><figcaption></figcaption></figure></div>

**Step 6**\
Click the **update** button.

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

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FqXTkGihCRa4kW4HYmMpJ%2Fadd%20event%20connector%204.png?alt=media&#x26;token=5e54f2bd-4693-4629-bffe-b4b649c5d776" alt="" width="563"><figcaption></figcaption></figure></div>

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

{% 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](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener).
{% endhint %}

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

## Related information

* [Trigger shape (event connector)](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape/trigger-shape-event-listener)
