RabbitExchange
faststream.rabbit.RabbitExchange #
RabbitExchange(
name: str = "",
type: ExchangeType = DIRECT,
durable: bool = True,
auto_delete: bool = False,
declare: bool = True,
arguments: dict[str, Any] | None = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_to: Optional[RabbitExchange] = None,
bind_arguments: dict[str, Any] | None = None,
routing_key: str = "",
)
Bases: NameRequired
A class to represent a RabbitMQ exchange.
Initialize a RabbitExchange object.
| PARAMETER | DESCRIPTION |
|---|---|
name | RabbitMQ exchange name. TYPE: |
type | RabbitMQ exchange type. TYPE: |
durable | Whether the object is durable. TYPE: |
auto_delete | The exchange will be deleted after connection closed. TYPE: |
declare | Whether to exchange automatically or just connect to it. TYPE: |
arguments | Exchange declarationg arguments. TYPE: |
timeout | Send confirmation time from RabbitMQ. TYPE: |
robust | Whether to declare exchange object as restorable. TYPE: |
bind_to | Another TYPE: |
bind_arguments | Exchange-exchange binding options. TYPE: |
routing_key | Explicit binding routing key. TYPE: |
Source code in faststream/rabbit/schemas/exchange.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
routing #
routing() -> str
Return real routing_key of object.
Source code in faststream/rabbit/schemas/exchange.py
67 68 69 | |
validate classmethod #
validate(
value: Union[str, RabbitExchange, None], **kwargs: Any
) -> RabbitExchange
Source code in faststream/rabbit/schemas/exchange.py
124 125 126 127 128 129 130 131 132 133 134 | |