describeBrokerConnections

JSON MQ and Hub "describeBrokerConnections" action returns info about broker connections

The "describeBrokerConnections" action returns all available information about specified broker connections.

 

Request examples

Minimal

{
  "action":     "describeBrokerConnections",
  "params":     {
    "brokerConnectionNames": [ "MqttBroker1" ]
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

 

Response examples

Minimal

{
    "result": {
        "brokerConnectionNames": [
            {
                "brokerHostname": "https://mqtt.faircom.com/",
                "brokerPort": 1883,
                "brokerUserName": "",
                "reconnectFrequencySeconds": 15,
                "isConnected": true,
                "statusCode": 9026,
                "statusMessage": "Not able to connect thread to MQTT broker"
            }
        ]
    },
    "requestId": "00000056",
    "errorCode": 0,
    "errorMessage": ""
}
 
 

 

Properties

Request properties ("params")

Property Description Default Type Limits (inclusive)

brokerConnectionNames

The "brokerConnectionNames" property contains a list of "brokerConnectionName" strings. 

  • Must contain at least one string.
  • Each string is the name of a table.
  • A zero-length string is invalid.
  • A client should force uniqueness of the items in the array because the server ignores duplicate items.
Optional with default of []

array

"brokerHostname"

"brokerPort"

"brokerUserName"

"isConnected"

"reconnectFrequencySeconds"

"statusCode"

"statusMessage"

 

Response properties ("result")

Property Description Type Limits (inclusive)

brokerConnectionNames

The "brokerConnectionNames" property contains a list of "brokerConnectionName" strings. Each string is the name of a table. A client should force uniqueness of the items in the array because the server ignores duplicate items.

array of objects

1 object for each broker connection matching the request containing some or all of the following properties:

"brokerHostname"

"brokerPort"

"brokerUserName"

"reconnectFrequencySeconds"

"isConnected"

"statusCode"

"statusMessage"

brokerConnectionNames

.brokerHostname

The "brokerHostname" property indicates the unique broker hostname or TCP/IP address of the specified broker connection.

string The unique broker host name or TCP/IP address of the specified broker connection.

brokerConnectionNames

.brokerPort

The "brokerPort" property defines the TCP/IP port.

integer A number between 1 and 65535

brokerConnectionNames

.brokerUserName

The "brokerUsername" property is the login name to the external broker. 

Note Unlike some other properties containing the "name", the "name" in "brokerUsername" is all lowercase.

VARCHAR(500) string The login name to the external broker.

brokerConnectionNames

.isConnected

The "isConnected" property indicates whether the specified broker connection is active. Boolean

true

false

brokerConnectionNames

.reconnectFrequencySeconds

The "reconnectFrequencySeconds" property is the number of seconds that the broker waits between attempts to reconnect to an external broker. 

  • If it is set to 0, the broker does not attempt to reconnect when it loses a connection or fails to connect.
  • FairCom's servers attempt to connect to an external broker when it is configured as a subscriber to topics on an external broker or when it is configured to forward messages to an external broker.
    • To stop the reconnect process, send the "configureBrokerConnection" message with the command property set to "disconnect".
  • To restart the reconnect process, send the "configureBrokerConnection" message with the command property set to "reconnect".
int32 the number of seconds the broker will wait between attempts to reconnect to an external broker.

brokerConnectionNames

.statusCode

The "statusCode" property displays the status code for the specified broker connection. integer See error codes

brokerConnectionNames

.statusMessage

The "statusMessage" property describes the status code with a written explanation. string 0 to 1024 bytes