CREATING AN AMQP CONNECTION
Creating a Connection With API
The creation of a connection establishes a bidirectional messaging transport link between ThingPark X IoT Flow and the cloud provider. Events and commands from multiple Devices will be multiplexed over this messaging transport link.
To do this, you need to use the Connections group resource:
POST/connections
to create a new Connection instancePUT/connections
to update a Connection instanceDELETE/connections
to delete a Connection instance
We follow the REST-full API pattern, when updating configuration properties for a connection resource. Thus, you must also provide the whole configuration again.
Example for creation of a new connection instance :
- AMQP connection with TCP
POST /connections
{
"connectorId": "actility-amqp-0.9.1-iot",
"name": "Actility AMQP (TCP) Connection",
"configuration": {
"uplinkTopicPattern": "amqp.things.{DevEUI}.uplink",
"downlinkTopicPattern": "amqp.things.{DevEUI}.downlink",
"hostName": "amqp.actility.com:5672",
"protocol": "TCP",
"username": "mycompany",
"password": "mypassword",
"exchangeName": "IotFlowExchange"
}
}
- AMQP connection with SSL
{
"connectorId": "actility-amqp-0.9.1-iot",
"name": "Actility AMQP (SSL) Connection",
"configuration": {
"uplinkTopicPattern": "amqp.things.{DevEUI}.uplink",
"downlinkTopicPattern": "amqp.things.{DevEUI}.downlink",
"hostName": "amqp.actility.com:5671",
"protocol": "SSL",
"username": "mycompany",
"password": "mypassword",
"certificate": "--BEGIN CERTIFICATE--kCFGNqMDBA...QJvW3--END CERTIFICATE--",
"privateKey": "--BEGIN RSA PRIVATE KEY--MIIEowIBAA...lOF5whZXzrHHACsWqAwermxHK7--END RSA PRIVATE KEY--",
"exchangeName": "IotFlowExchange"
}
}
The following table lists the properties applicable to a connection instance.
JSON Field | Description |
---|---|
connectorId | Must be set to actility-amqp-0.9.1-iot for AMQP platform. |
uplinkTopicPattern | Defines a pattern of topic for the Uplink. |
downlinkTopicPattern | Defines a pattern of topic for the Downlink. |
hostName | The Hostname and Port of your AMQP server. Example: amqp.company.com:5672. |
protocol | Protocol to be used for your connection to the AMQP server. Can be set to TCP or SSL. |
certificate | The client certificate file used to connect to your AMQP server. Only needed if protocol is set to SSL. |
privateKey | The client private key file used to connect to your AMQP server. Only needed if protocol is set to SSL. |
exchangeName | The exchange name e.g. amqp.topic |
All properties are not present in this example. You can check the rest of these properties in the common parameters section.
Creating a Connection From UI
You must have deployed a AMQP server prior to connecting with the AMQP protocol-based application.
UI Field | Description |
---|---|
Application Name | Name of the application that you want to register (Editable). |
Hostname | The Hostname and Port of your AMQP server. Example: amqp.actility.com:5672. (Editable) |
Uplink Topic Pattern | Defines a pattern of topic for the Uplink. (Editable) |
Downlink Topic Pattern | Defines a pattern of topic for the Downlink. (Editable) |
Protocol | Choose between the SSL protocol or the TCP protocol. (Editable) |
Certificate | The client certificate file used to connect to your AMQP server. (Editable) |
Private Key | The client private key file used to connect to your AMQP server. (Editable) |
AMQP Username | The username to access your AMQP server. (Editable) |
AMQP Password | The password used to access your AMQP server. (Editable) |
Exchange Name | The exchange name e.g. amqp.topic (Editable) |
- Click Connections -> Create -> ThingPark X Iot Flow.
Then, a new page will open. Select the connection type : AMQP.
- Fill in the form as in the example below and click on Create.
The form changes depending on the protocol selected: SSL or TCP.
Parameters marked with * are mandatory.
- A notification appears on the upper right side of your screen to confirm that the application has been created.
- After creating the application, you will be redirected to the application details.
Changing the Settings after Creation
You can change the settings parameters such as the email or the password after the creation of the AMQP application.
To do this, proceed as follows:
-
Select the AMQP application for which you want to change one or several parameters.
-
In the application information dashboard, click on the Edit button corresponding to the parameter you want to change.
- Enter the new value, and click on the Confirm icon.
- The Confirmation window displays,
- A notification will inform you that the parameter is updated.
Limitations
There are currently no known limitations to the AMQP connector.
Displaying Information to Know if it Worked
- Open a new RabbitMQ Management window and click on the Connections section.
- Select your connection in the list.
- You can see all your connection's details and status.
Troubleshooting
As for now, there are no detected bugs.