diff --git a/faststream/rabbit/broker/broker.py b/faststream/rabbit/broker/broker.py index 8a0670fe3c..654dfeb760 100644 --- a/faststream/rabbit/broker/broker.py +++ b/faststream/rabbit/broker/broker.py @@ -536,116 +536,6 @@ async def start(self) -> None: logger_state.log(f"Set max consumers to {self._max_consumers}") - - @overload - async def publish( - self, - message: "AioPikaSendableMessage" = None, - queue: None = "", - exchange: Union["RabbitExchange", str, None] = None, - *, - routing_key: str = "", - # ↓ publish kwargs - mandatory: bool = True, - immediate: bool = False, - timeout: "TimeoutType" = None, - persist: bool = False, - reply_to: Optional[str] = None, - correlation_id: Optional[str] = None, - # ↓ kwargs for super().init(), super is PublishCommand - headers: Optional["HeadersType"] = None, - content_type: Optional[str] = None, - content_encoding: Optional[str] = None, - expiration: Optional["DateType"] = None, - message_id: Optional[str] = None, - timestamp: Optional["DateType"] = None, - message_type: Optional[str] = None, - user_id: Optional[str] = None, - priority: Optional[int] = None, - ) -> None:... - - @overload - async def publish( - self, - message: "AioPikaSendableMessage" = None, - queue: Union["RabbitQueue", str] = "", - exchange: None = None, - *, - routing_key: str = "", - # ↓ publish kwargs - mandatory: bool = True, - immediate: bool = False, - timeout: "TimeoutType" = None, - persist: bool = False, - reply_to: Optional[str] = None, - correlation_id: Optional[str] = None, - # ↓ kwargs for super().init(), super is PublishCommand - headers: Optional["HeadersType"] = None, - content_type: Optional[str] = None, - content_encoding: Optional[str] = None, - expiration: Optional["DateType"] = None, - message_id: Optional[str] = None, - timestamp: Optional["DateType"] = None, - message_type: Optional[str] = None, - user_id: Optional[str] = None, - priority: Optional[int] = None, - ) -> None:... - - @overload - async def publish( - self, - message: "AioPikaSendableMessage" = None, - queue: None = "", - exchange: None = None, - *, - routing_key: str = "", - # ↓ publish kwargs - mandatory: bool = True, - immediate: bool = False, - timeout: "TimeoutType" = None, - persist: bool = False, - reply_to: Optional[str] = None, - correlation_id: Optional[str] = None, - # ↓ kwargs for super().init(), super is PublishCommand - headers: Optional["HeadersType"] = None, - content_type: Optional[str] = None, - content_encoding: Optional[str] = None, - expiration: Optional["DateType"] = None, - message_id: Optional[str] = None, - timestamp: Optional["DateType"] = None, - message_type: Optional[str] = None, - user_id: Optional[str] = None, - priority: Optional[int] = None, - ) -> None:... - - @overload - async def publish( - self, - message: "AioPikaSendableMessage" = None, - queue: Union["RabbitQueue", str] = "", - exchange: Union["RabbitExchange", str, None] = None, - *, - routing_key: str = "", - # ↓ publish kwargs - mandatory: bool = True, - immediate: bool = False, - timeout: "TimeoutType" = None, - persist: bool = False, - reply_to: Optional[str] = None, - correlation_id: Optional[str] = None, - # ↓ kwargs for super().init(), super is PublishCommand - headers: Optional["HeadersType"] = None, - content_type: Optional[str] = None, - content_encoding: Optional[str] = None, - expiration: Optional["DateType"] = None, - message_id: Optional[str] = None, - timestamp: Optional["DateType"] = None, - message_type: Optional[str] = None, - user_id: Optional[str] = None, - priority: Optional[int] = None, - ) -> "aiormq.abc.ConfirmationFrameType":... - - @override async def publish( self, message: "AioPikaSendableMessage" = None, @@ -670,7 +560,7 @@ async def publish( message_type: Optional[str] = None, user_id: Optional[str] = None, priority: Optional[int] = None, - ) -> Optional["aiormq.abc.ConfirmationFrameType"]: + ) -> "aiormq.abc.ConfirmationFrameType": """Publish message directly. This method allows you to publish message in not AsyncAPI-documented way. You can use it in another frameworks