add_consumer
Tell worker(s) to consume from task queue by name.
def add_consumer(
state: object,
queue: string,
exchange: string,
exchange_type: string,
routing_key: string,
**options: dict
) - > dict
Tell worker(s) to consume from task queue by name.
Parameters
| Name | Type | Description |
|---|---|---|
| state | object | The current state object of the worker control instance |
| queue | string | The name of the task queue to start consuming from |
| exchange | string | The name of the exchange to bind the queue to |
| exchange_type | string | The type of exchange (e.g., 'direct', 'topic', 'fanout'); defaults to 'direct' if not specified |
| routing_key | string | The routing key to use for the queue binding |
| **options | dict | Additional keyword arguments passed to the task queue configuration |
Returns
| Type | Description |
|---|---|
dict | A success response dictionary containing a confirmation message including the queue name |