kombu.transport.base — Kombu v1.3.2 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Kombu v1.3.2 documentation »
- API Reference »

# kombu.transport.base

Base transport interface.

copyright: | 2009 - 2011 by Ask Solem.
license: | BSD, see LICENSE for more details.

- Message
- Transport

## Message

class `kombu.transport.base.` `Message`(channel, body=None, delivery_tag=None, content_type=None, content_encoding=None, delivery_info={}, properties=None, headers=None, postencode=None, **kwargs)

  Base class for received messages.

  `payload`

    The decoded message body.

  `channel`

    The channel the message was received on.

  `delivery_tag`

    Delivery tag used to identify the message in this channel.

  `content_type`

    Content type used to identify the type of content.

  `content_encoding`

    Content encoding used to identify the text encoding of the body.

  `delivery_info`

    Additional delivery information.

  `headers`

    Message headers

  `properties`

    Application properties

  `body`

    Raw message body (may be serialized), see `payload` instead.

  `acknowledged`

    Set to true if the message has been acknowledged.

  `ack`()

    Acknowledge this message as being processed., This will remove the message from the queue.

    Raises MessageStateError:
    | If the message has already been acknowledged/requeued/rejected.

  `reject`()

    Reject this message.

    The message will be discarded by the server.

    Raises MessageStateError:
    | If the message has already been acknowledged/requeued/rejected.

  `requeue`()

    Reject this message and put it back on the queue.

    You must not use this method as a means of selecting messages to process.

    Raises MessageStateError:
    | If the message has already been acknowledged/requeued/rejected.

  `decode`()

    Deserialize the message body, returning the original python structure sent by the publisher.

## Transport

class `kombu.transport.base.` `Transport`(client, **kwargs)

  Base class for transports.

  `client`

    The `BrokerConnection` owning this instance.

  `default_port`

    Default port used when no port has been specified.

  `connection_errors`

    Tuple of errors that can happen due to connection failure.

  `channel_errors`

    Tuple of errors that can happen due to channel/method failure.

  `establish_connection`()
  `close_connection`(connection)
  `create_channel`(connection)
  `close_channel`(connection)
  `drain_events`(connection, **kwargs)

### Navigation

- index
- modules |
- next |
- previous |
- Kombu v1.3.2 documentation »
- API Reference »