RabbitSubscriberSpecification
faststream.rabbit.subscriber.specification.RabbitSubscriberSpecification #
RabbitSubscriberSpecification(
_outer_config: T_BrokerConfig,
specification_config: T_SpecificationConfig,
calls: CallsCollection[Any],
)
Bases: SubscriberSpecification[RabbitBrokerConfig, RabbitSubscriberSpecificationConfig]
Source code in faststream/_internal/endpoint/subscriber/specification.py
34 35 36 37 38 39 40 41 | |
channel_labels property #
channel_labels: list[str]
A queue and the exchange it is bound to, which is not the address.
The address is the routing key; a queue is a place to read from. Both are needed to tell two subscribers apart, so the label carries both.
address property #
address: str | None
The routing key the queue is bound by, prefixed.
None where the exchange ignores routing keys: a fanout reaches every queue bound to it, so the queue this subscriber reads from names nothing a message is routed by. The document drops the queue binding for the same reason, and drops the address rather than giving an empty one — AsyncAPI reads an absent address as unknown, which "" does not say.
get_schema #
get_schema() -> dict[str, SubscriberSpec]
Source code in faststream/rabbit/subscriber/specification.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
get_payloads #
get_payloads() -> list[tuple[dict[str, Any], str]]
Source code in faststream/_internal/endpoint/subscriber/specification.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |