RabbitExchange
faststream.rabbit.RabbitExchange #
RabbitExchange(
name: str,
type: ExchangeType = ExchangeType.DIRECT,
durable: bool = False,
auto_delete: bool = False,
internal: bool = False,
passive: bool = False,
arguments: Optional[AnyDict] = None,
timeout: TimeoutType = None,
robust: bool = True,
bind_to: Optional[RabbitExchange] = None,
bind_arguments: Optional[AnyDict] = None,
routing_key: str = "",
)
Bases: NameRequired
A class to represent a RabbitMQ exchange.
METHOD | DESCRIPTION |
---|---|
__hash__ | returns the hash value of the exchange |
__init__ | initializes the RabbitExchange object |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Initialize a RabbitExchange object.
PARAMETER | DESCRIPTION |
---|---|
name | Name of the exchange. TYPE: |
type | Type of the exchange. Defaults to ExchangeType.DIRECT. TYPE: |
durable | Whether the exchange should survive broker restarts. Defaults to False. TYPE: |
auto_delete | Whether the exchange should be deleted when no longer in use. Defaults to False. TYPE: |
internal | Whether the exchange is used for internal purposes and should not be published to directly. Defaults to False. TYPE: |
passive | Whether to check if the exchange exists before creating it. Defaults to False. TYPE: |
arguments | Additional arguments for the exchange. Defaults to None. TYPE: |
timeout | Timeout for the operation. Defaults to None. TYPE: |
robust | Whether to use robust mode for the exchange. Defaults to True. TYPE: |
bind_to | Exchange to bind to. Defaults to None. TYPE: |
bind_arguments | Arguments for the binding. Defaults to None. TYPE: |
routing_key | Routing key for the exchange. Defaults to "". TYPE: |
RAISES | DESCRIPTION |
---|---|
NotImplementedError | |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/rabbit/shared/schemas.py
validate classmethod
#
Validates a value.
PARAMETER | DESCRIPTION |
---|---|
value | The value to be validated. |
RETURNS | DESCRIPTION |
---|---|
Optional[NameRequiredCls] | The validated value. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)