Skip to main content

"deleteBrokerConnection"

Abstract

deleteBrokerConnection deletes a previously created broker connection.

The "deleteBrokerConnection" action deletes a previously created broker connection. It will not be deleted if the connection is being used by one or more MQTT topics.

Things to know

  • The "brokerConnectionName" parameter is required.

  • If FairCom's servers cannot delete the broker connection, it will log an error stating, "broker Connection Name xxx cannot be deleted because it is being used by the following topics: xxx, xxx, xxx."

Request examples

Minimal request example

{
  "api": "mq",
  "action": "deleteBrokerConnection",
  "authToken": "replaceWithAuthTokenFromCreateSession",
  "params": {
    "brokerConnectionName": "MqttBroker1"
  }
}

Response examples

Successful response example

{
    "result": {},
    "errorCode": 0,
    "errorMessage": ""
}

"params"

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties.

Property summary

Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

"brokerConnectionName"

specifies a user-defined unique name for a broker integration

Required - No default value

string

Minimum length: 1
Maximum length: 100


The "brokerConnectionName" property is a required string that is a unique user-defined name for the connection. It may be up to 100 characters long.

Things to know:
  • The unique name defined in the "brokerConnectionName" property is used in all subsequent references to the connection, such as when configuring a topic to subscribe or forward messages to an external broker or when altering or deleting a broker connection.

  • If the "brokerConnectionName" already exists, FairCom's server will update the record rather than create it.

  • If you do not wish to share a broker connection between multiple topics/integration tables (so you can control the broker connections independently), you can create multiple broker connections which all connect to the same external MQTT broker - giving each broker connection record a different "brokerConnectionName".