# This file is in relaxed JSON format (it allows comments and trailing commas).
#
# All worker pools running on this host must be defined here, specifying 
# which logical bus should be used and which services it will run.
#
# In this example two worker pools are defined. These are almost identical,
# but use different backend brokers in order to improve fault tolerance.
#
# Each pool definition must contain the following parameters:
#
#  - pool-id : arbitrary identifier of worker pool
#  - bus-id  : identifier of logical bus used by worker processes
#  - workers : a map of worker classes to arbitrary config hashes
#
# To start a the worker pools use the "bkpr" command:
#
# $ ./bkpr --pool-id "broker" start
# $ ./bkpr --pool-id "myapp-A" start
# $ ./bkpr --pool-id "myapp-B" start

[
    {
        "pool-id"       : "broker",
        "bus-id"        : "toybroker",
        "description"   : "ToyBroker",
        "workers"       :  {},
        "use_toybroker" :  1,
    },
    {
        "pool-id"       : "myapp-A",
        "bus-id"        : "backend-A",
        "description"   : "pool #1 of MyApp workers",

        "workers" : {
            "MyApp::Service::Chat::Worker"         : { "workers_count" : 8 },
            "MyApp::Service::Auth::Worker"         : { "workers_count" : 2 },
            "Beekeeper::Service::Router::Worker"   : { "workers_count" : 2 },
            "Beekeeper::Service::LogTail::Worker"  : { "workers_count" : 1 },
        },
    },
    {
        "pool-id"     : "myapp-B",
        "bus-id"      : "backend-B",
        "description" : "pool #2 of MyApp workers",

        "workers" : {
            "MyApp::Service::Chat::Worker"         : { "workers_count" : 8 },
            "MyApp::Service::Auth::Worker"         : { "workers_count" : 2 },
            "Beekeeper::Service::Router::Worker"   : { "workers_count" : 2 },
            "Beekeeper::Service::LogTail::Worker"  : { "workers_count" : 1 },
        },
    },
]