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

# Abstract Classes - `kombu.abstract`

Object utilities.

class kombu.abstract.MaybeChannelBound(*args: Any, **kwargs: Any)

  Mixin for classes that can be bound to an AMQP channel.

  bind(channel: Channel | Connection) → _MaybeChannelBoundType

    Create copy of the instance that is bound to a channel.

  can_cache_declaration = False

    Defines whether maybe_declare can skip declaring this entity twice.

  property channel: Channel

    Current channel if the object is bound.

  property is_bound: bool

    Flag set if the channel is bound.

  maybe_bind(channel: Channel | Connection) → _MaybeChannelBoundType

    Bind instance to channel if not already bound.

  revive(channel: Channel) → None

    Revive channel after the connection has been re-established.

    Used by `ensure()`.

  when_bound() → None

    Callback called when the class is bound.