Skip to main content

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 instance
  • PUT/connections to update a Connection instance
  • DELETE/connections to delete a Connection instance
Note

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 FieldDescription
connectorIdMust be set to actility-amqp-0.9.1-iot for AMQP platform.
uplinkTopicPatternDefines a pattern of topic for the Uplink.
downlinkTopicPatternDefines a pattern of topic for the Downlink.
hostNameThe Hostname and Port of your AMQP server. Example: amqp.company.com:5672.
protocolProtocol to be used for your connection to the AMQP server. Can be set to TCP or SSL.
certificateThe client certificate file used to connect to your AMQP server. Only needed if protocol is set to SSL.
privateKeyThe client private key file used to connect to your AMQP server. Only needed if protocol is set to SSL.
exchangeNameThe exchange name e.g. amqp.topic
Important note

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 FieldDescription
Application NameName of the application that you want to register (Editable).
HostnameThe Hostname and Port of your AMQP server. Example: amqp.actility.com:5672. (Editable)
Uplink Topic PatternDefines a pattern of topic for the Uplink. (Editable)
Downlink Topic PatternDefines a pattern of topic for the Downlink. (Editable)
ProtocolChoose between the SSL protocol or the TCP protocol. (Editable)
CertificateThe client certificate file used to connect to your AMQP server. (Editable)
Private KeyThe client private key file used to connect to your AMQP server. (Editable)
AMQP UsernameThe username to access your AMQP server. (Editable)
AMQP PasswordThe password used to access your AMQP server. (Editable)
Exchange NameThe exchange name e.g. amqp.topic (Editable)
  1. Click Connections -> Create -> ThingPark X Iot Flow.

img

Then, a new page will open. Select the connection type : AMQP.

img

  1. Fill in the form as in the example below and click on Create.
Warning

The form changes depending on the protocol selected: SSL or TCP.

img

Note

Parameters marked with * are mandatory.

  • A notification appears on the upper right side of your screen to confirm that the application has been created.

img

  1. After creating the application, you will be redirected to the application details.

img

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:

  1. Select the AMQP application for which you want to change one or several parameters.

  2. In the application information dashboard, click on the Edit button corresponding to the parameter you want to change.

img

  1. Enter the new value, and click on the Confirm icon.

img

  • The Confirmation window displays,

img

  • A notification will inform you that the parameter is updated.

img

Limitations

There are currently no known limitations to the AMQP connector.

Displaying Information to Know if it Worked

  1. Open a new RabbitMQ Management window and click on the Connections section.

img

  1. Select your connection in the list.

img

  1. You can see all your connection's details and status.

img

Troubleshooting

As for now, there are no detected bugs.