Product Documentation

MQTT V3 Plug-in Reference

Previous Topic

Next Topic

Persisting to a Remote FairCom Database Server

The following properties allow the FairCom MQTT Broker to persist data in a remote c-tree database server rather than on the default local database server. This feature is optional and it only applies to the Persistence Topics which explicitly enable it. Thus, by default, Persistence Topics store data in the local c-tree database, but you can use this set of properties to configure individual Persistence Topics to store data in remote c-tree databases.

"databaseConnectionString"

  • String
  • Optional
  • Defaults to "FAIRCOMS@localhost"

    This is the database that runs on the same computer as the FairCom MQTT Broker.

This is the connection string for the database instance where data will be stored for this topic.

  • It provides great flexibility for the location of the database.
  • It allows you to rename the FairCom database instance.
  • It allows you to store data in a FairCom database instance running on a remote computer.
  • It allows you to store data in one of several database instances running on the same computer.

    FairCom supports running multiple database instances on the same computer.

"AlterPersistenceTopic" cannot change the database connection string.

To move data persistence to another database instance, you must delete the Persistence Topic and create a new one.

"databaseName"

  • String
  • Optional
  • Defaults to "ctreeSQL"

It is the name of the database where the table will be created.

If a database with this name does not exist, it is created.

"AlterPersistenceTopic" cannot change the database name.

To move data persistence to another database, you must delete the Persistence Topic and create a new one.

"databaseUserName"

  • String
  • Optional
  • Defaults to "ADMIN"

It is the user name for logging into the specified database.

  • You can set this to any user that exists in the database.

It is the owner of the table that is created by "CreatePersistenceTopic"

"AlterPersistenceTopic" can modify this later.

If a user name is supplied and it does not exist in the server, “Failed to execute CreatePersistenceTopic operation on the topic <your topic here> - c-tree logon error: 450” will be logged to CTSTATUS.FCS.

"databaseUserPassword"

  • String
  • Optional
  • Defaults to "ADMIN"

It is the password for logging into the specified database.

  • Use the password that corresponds to the user name specified above.

Note that the database default password for the "ADMIN" user is "ADMIN".

To follow security best practices, you should change the database default password to a more secure value, such as at least 12 characters with crypto-random generated numbers, symbols, lowercase and uppercase letters.

"AlterPersistenceTopic" can modify this later.

TOCIndex