This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.

抽象类- kombu.abstract

对象实用程序。

class kombu.abstract.MaybeChannelBound(*args: Any, **kwargs: Any)[源代码]

可以绑定到AMQP通道的类的混合。

bind(channel: Channel | Connection) _MaybeChannelBoundType[源代码]

创建绑定到频道的实例的副本。

can_cache_declaration = False

定义Maybe_Declare是否可以跳过两次声明此实体。

property channel: Channel

如果对象已绑定,则返回当前频道。

property is_bound: bool

如果绑定了通道,则设置标志。

maybe_bind(channel: Channel | Connection) _MaybeChannelBoundType[源代码]

将实例绑定到通道(如果尚未绑定)。

revive(channel: Channel) None[源代码]

重新建立连接后恢复频道。

使用者 ensure()

when_bound() None[源代码]

绑定类时调用的回调。