Skip to content

Настройки брокера

Bases: BaseModel

RabbitMQ connection settings.

You can pass any extra options supported by the RabbitMQ client.

Examples

.. code-block:: yaml :caption: config.yml

broker:
    url: amqp://guest:guest@rabbitmq:5672/

    # custom option passed directly to RabbitMQ client
    connection_timeout: 30
Source code in syncmaster/settings/broker.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class RabbitMQSettings(BaseModel):
    """RabbitMQ connection settings.

    You can pass any extra options supported by the RabbitMQ client.

    Examples
    --------

    .. code-block:: yaml
        :caption: config.yml

        broker:
            url: amqp://guest:guest@rabbitmq:5672/

            # custom option passed directly to RabbitMQ client
            connection_timeout: 30
    """

    url: str = Field(
        description=(
            "RabbitMQ connection URL.\n\nSee the `RabbitMQ documentation <https://www.rabbitmq.com/uri-spec.html>`_ "
        ),
    )

    model_config = ConfigDict(extra="allow")