RabbitPublisherSpecification
faststream.rabbit.publisher.specification.RabbitPublisherSpecification #
RabbitPublisherSpecification(
_outer_config: T_BrokerConfig,
specification_config: T_SpecificationConfig,
)
Bases: PublisherSpecification[RabbitBrokerConfig, RabbitPublisherSpecificationConfig]
Source code in faststream/_internal/endpoint/publisher/specification.py
routing property #
The routing key this publisher was declared with, as the name reads it.
This is the channel name's question, not the address's: an explicit routing_key names the channel whatever the exchange does with it. See address for the string a message actually travels by.
address property #
The routing key a message published here travels by, prefixed.
The exchange decides first, not the declaration: a fanout reaches every queue bound to it and ignores any routing key handed to it, so one declared anyway still addresses nothing. The subscriber gates on the same question, which is what keeps both ends of an address showing one string.
None rather than "" for that case: AsyncAPI reads an absent address as unknown, and an empty one as an address zero characters long.
get_schema #
get_schema() -> dict[str, PublisherSpec]