# This file is in relaxed JSON format (it allows comments and trailing commas).
#
# Logical buses used in pool.config.json must be defined here, specifying the
# conection parameters to the MQTT broker that will service them.
#
# In this example four logical buses are defined, all of them residing in the
# same local broker. For development purposes it is handy to use a single broker
# to hold all logical buses and easily simulate a complex topology, but in 
# production enviroments it is desirable to isolate brokers from each other.
#
# Each bus definition accepts the following parameters:
#
#  - bus_id   : unique identifier of the logical bus (required)
#  - bus_role : specifies if the bus is acting as frontend or backend
#  - host     : hostname or IP address of the broker (default is localhost)
#  - port     : port of the broker (default is 1883)
#  - tls      : if set to true enables the use of TLS on broker connection
#  - username : username used to connect to the broker
#  - password : password used to connect to the broker

[
    {
        "bus_id"   : "backend-1",
        "bus_role" : "backend",
        "host"     : "localhost",
        "username" : "backend",
        "password" : "def456",
        "auth_salt": "qQA9zC",
        "default"  : 1,
    },
    {
        "bus_id"   : "backend-2",
        "bus_role" : "backend",
        "host"     : "localhost",
        "username" : "backend",
        "password" : "def456",
        "auth_salt": "qQA9zC",
    },
    {
        "bus_id"   : "frontend-1",
        "bus_role" : "frontend",
        "host"     : "localhost",
        "port"     :  8001,
        "username" : "router",
        "password" : "ghi789",
    },
#   {
#       "bus_id"   : "frontend-2",    # The MQTT topics for receiving notifications
#       "bus_role" : "frontend",      # will clash when using the same broker for
#       "host"     : "localhost",     # both 'frontend-1' and 'frontend-2', causing
#       "port"     :  8001,           # the reception of duplicated notifications.
#       "username" : "router",        # Uncomment this if 'frontend-2' is actually a
#       "password" : "ghi789",        # separate broker (as it should be).
#   },
    {
        "bus_id"   : "toybroker",
        "host"     : "localhost",
        "username" : "backend",
        "password" : "def456",
    },
]