// Module included in the following assemblies:
// as_amq2api-intro.adoc

[id='amq2api-create-amq-connection_{context}']
= Creating an AMQ connection

The AMQ to REST API sample integration starts by connecting to an
AMQ broker (Red Hat AMQ) that is provided in your OpenShift  
project. Before you
start to create the integration itself, you must start the broker
and create a connection to that broker. 

.Procedure

. Verify that the broker has started:

.. In a browser, go to your OpenShift web console.

.. In the console, click *Project*.

.. On the *Overview* page, in the *Inventory* section, click *Services*.

.. Click *broker-amq-tcp* and then click *Pods*. The status of the pod should be `Running`.

. Create the AMQ connection:

.. In {prodname}, in the left panel, click *Connections* to display any
available connections.
.. Click *Create Connection* to display
{prodname} connectors.
.. Click the *Red Hat AMQ* connector.
.. Configure the connection by entering:
+
... In the *Broker URL* field, enter `*tcp://broker-amq-tcp:61616*`
as the location to obtain data from.
... In the *User name* field, enter `*amq*` as the user name for
the account that accesses this AMQ broker.
... In the *Password* field, enter `*topSecret*` as the password for
the account that accesses this AMQ broker.
... Leave the other fields blank.
.. Click *Validate*. {prodname} immediately tries to validate the
connection and displays a message that indicates whether
validation is successful. If validation fails, check the values you
entered and try again.
.. When validation is successful, click *Next*.
.. In the *Name* field, enter your choice of a name that
helps you distinguish this connection from any other connections.
For example, enter `*Red Hat AMQ Broker 1*`.
.. In the *Description* field, optionally enter any information that
is helpful to know about this connection. For example,
enter `*Connection to the provided Red Hat AMQ message broker.*`
.. Click *Save* to see that the connection you
created is now available. If you entered the example name, you would
see that *Red Hat AMQ Broker 1* is now available.
