Config File
The cbq config file is where you define Queue Connections as well as Worker Pools. These Connections and Worker Pools can also be added, removed, or modified based on the current environment. When you want to change where your queued Jobs are sent or how they are worked, this is the file you will modify.
Definitions
Queue Connections
Also referred to as "Connection." A Queue Connection defines where Jobs are serialized and the default settings that apply.
configure
The configure
method is where the production Queue Connection and Worker Pools definitions are constructed.
newConnection
This command creates a new QueueConnectionDefinition
builder component. It requires a unique name that will define this Connection and that will be used when defining Worker Pools.
A QueueConnectionDefinition
has various methods to configure the Queue Connection.
newWorkerPool
This command creates a new WorkerPoolDefinition
builder component. It requires a unique name
that will define this Worker Pool and a connectionName
that points to an already created Connection.
A WorkerPoolDefinition
has various methods to configure the Worker Pool.
reset
Removes all Connections and Worker Pools
Environment Overrides
Just as in your config/ColdBox.cfc
file or in ModuleConfig.cfc
files, you can add, remove, or modify Queue Connection or Worker Pool definitions per environment. You do this by defining a method on your Config component matching the environment name you want to override.
withConnection
Retrieves an already defined Queue Connection Definition for overriding. All the same methods are available.
delete
This method is not yet implemented.
withWorkerPool
Retrieves an already defined Worker Pool Definition for overriding. All the same methods are available.
delete
This method is not yet implemented.