// This module is included in the following assemblies:
// as_connecting-to-amq.adoc

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

In an integration, to obtain messages from or to publish messages to: 

* An Apache ActiveMQ broker that does not support AMQP
* An  AMQ 6 broker

Create a Red Hat AMQ connection, which you can add to an integration.

.Prerequisites
For the Red Hat AMQ broker that you want to connect to, you have the following:

* Broker URL
* User account credentials
* Broker's PEM certificate text

.Procedure

. In {prodname}, in the left panel, click *Connections* to
display any available connections.
. Click *Create Connection* to display
connectors.  
. Click the *Red Hat AMQ* connector.
. Configure the connection: 
+
.. In the *Broker URL* field, enter the location that you want to send data
to or obtain data from, for example, `tcp://localhost:61616`. 
.. In the *User name* field, enter the user name for the account that you want
to use to access this broker. 
.. In the *Password* field, enter the password for the account that you want
to use to access this broker.
.. In the *Client ID* field, enter the ID that allows connections to close
and reopen without missing messages. The destination type must be a topic.
.. If this connection will be used in a development
environment, you can save some time by disabling
*Check certificates*. Disabling the checking of certificates is a convenience for
development environments. For secure production environments, always enable 
*Check certificates*.
.. In the *Broker certificate* field, paste the Red Hat AMQ broker's PEM certificate text.
This is required except when you disable
checking the certificates. 
.. In the *Client certificate* field, paste the Red Hat client's PEM certificate text. 
Content in this field is always optional. 
. Click *Validate*. {prodname} immediately tries to validate the 
connection and displays a message that indicates whether 
validation is successful. If validation fails, revise the configuration
details as needed and try again.
. If 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, you might enter `Red Hat AMQ 1`.
. In the *Description* field, optionally enter any information that
is helpful to know about this connection. For example,
enter `*Sample Red Hat AMQ connection
that uses a provided 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 1* appears as a connection that you can 
choose to add to an integration.
