This document describes the current stable version of Kombu (4.0). For development docs, go here.

Redis Transport - kombu.transport.redis

Redis transport.

Transport

class kombu.transport.redis.Transport(*args, **kwargs)[source]

Redis Transport.

class Channel(*args, **kwargs)

Redis Channel.

class QoS(*args, **kwargs)

Redis Ack Emulation.

ack(delivery_tag)
append(message, delivery_tag)
pipe_or_acquire(*args, **kwds)
reject(delivery_tag, requeue=False)
restore_at_shutdown = True
restore_by_tag(tag, client=None, leftmost=False)
restore_unacked(client=None)
restore_visible(start=0, num=10, interval=10)
unacked_index_key
unacked_key
unacked_mutex_expire
unacked_mutex_key
visibility_timeout
Transport.Channel.ack_emulation = True
Transport.Channel.active_queues

Set of queues being consumed from (excluding fanout queues).

Transport.Channel.async_pool
Transport.Channel.basic_cancel(consumer_tag)
Transport.Channel.basic_consume(queue, *args, **kwargs)
Transport.Channel.client

Client used to publish messages, BRPOP etc.

Transport.Channel.close()
Transport.Channel.conn_or_acquire(*args, **kwds)
Transport.Channel.connection_class = None
Transport.Channel.fanout_patterns = True
Transport.Channel.fanout_prefix = True
Transport.Channel.from_transport_options = (u'body_encoding', u'deadletter_queue', u'ack_emulation', u'unacked_key', u'unacked_index_key', u'unacked_mutex_key', u'unacked_mutex_expire', u'visibility_timeout', u'unacked_restore_limit', u'fanout_prefix', u'fanout_patterns', u'socket_timeout', u'socket_connect_timeout', u'socket_keepalive', u'socket_keepalive_options', u'queue_order_strategy', u'max_connections', u'priority_steps')
Transport.Channel.get_table(exchange)
Transport.Channel.keyprefix_fanout = u'/{db}.'
Transport.Channel.keyprefix_queue = u'_kombu.binding.%s'
Transport.Channel.max_connections = 10
Transport.Channel.pool
Transport.Channel.priority(n)
Transport.Channel.priority_steps = [0, 3, 6, 9]
Transport.Channel.queue_order_strategy = u'round_robin'
Transport.Channel.sep = u'\x06\x16'
Transport.Channel.socket_connect_timeout = None
Transport.Channel.socket_keepalive = None
Transport.Channel.socket_keepalive_options = None
Transport.Channel.socket_timeout = None
Transport.Channel.subclient

Pub/Sub connection used to consume fanout queues.

Transport.Channel.supports_fanout = True
Transport.Channel.unacked_index_key = u'unacked_index'
Transport.Channel.unacked_key = u'unacked'
Transport.Channel.unacked_mutex_expire = 300
Transport.Channel.unacked_mutex_key = u'unacked_mutex'
Transport.Channel.unacked_restore_limit = None
Transport.Channel.visibility_timeout = 3600
Transport.default_port = 6379
Transport.driver_name = u'redis'
Transport.driver_type = u'redis'
Transport.driver_version()[source]
Transport.implements = {'async': True, 'exchange_type': frozenset([u'topic', u'fanout', u'direct']), 'heartbeats': False}
Transport.on_readable(fileno)[source]

Handle AIO event for one of our file descriptors.

Transport.polling_interval = None
Transport.register_with_event_loop(connection, loop)[source]

Channel

class kombu.transport.redis.Channel(*args, **kwargs)[source]

Redis Channel.

class QoS(*args, **kwargs)

Redis Ack Emulation.

ack(delivery_tag)
append(message, delivery_tag)
pipe_or_acquire(*args, **kwds)
reject(delivery_tag, requeue=False)
restore_at_shutdown = True
restore_by_tag(tag, client=None, leftmost=False)
restore_unacked(client=None)
restore_visible(start=0, num=10, interval=10)
unacked_index_key
unacked_key
unacked_mutex_expire
unacked_mutex_key
visibility_timeout
Channel.ack_emulation = True
Channel.active_queues

Set of queues being consumed from (excluding fanout queues).

Channel.async_pool
Channel.basic_cancel(consumer_tag)[source]
Channel.basic_consume(queue, *args, **kwargs)[source]
Channel.client[source]

Client used to publish messages, BRPOP etc.

Channel.close()[source]
Channel.conn_or_acquire(*args, **kwds)[source]
Channel.connection_class = None
Channel.fanout_patterns = True

If enabled the fanout exchange will support patterns in routing and binding keys (like a topic exchange but using PUB/SUB).

Enabled by default since Kombu 4.x. Disable for backwards compatibility with Kombu 3.x.

Channel.fanout_prefix = True

Transport option to disable fanout keyprefix. Can also be string, in which case it changes the default prefix (‘/{db}.’) into to something else. The prefix must include a leading slash and a trailing dot.

Enabled by default since Kombu 4.x. Disable for backwards compatibility with Kombu 3.x.

Channel.from_transport_options = (u'body_encoding', u'deadletter_queue', u'ack_emulation', u'unacked_key', u'unacked_index_key', u'unacked_mutex_key', u'unacked_mutex_expire', u'visibility_timeout', u'unacked_restore_limit', u'fanout_prefix', u'fanout_patterns', u'socket_timeout', u'socket_connect_timeout', u'socket_keepalive', u'socket_keepalive_options', u'queue_order_strategy', u'max_connections', u'priority_steps')
Channel.get_table(exchange)[source]
Channel.keyprefix_fanout = u'/{db}.'
Channel.keyprefix_queue = u'_kombu.binding.%s'
Channel.max_connections = 10
Channel.pool
Channel.priority(n)[source]
Channel.priority_steps = [0, 3, 6, 9]
Channel.queue_order_strategy = u'round_robin'

Order in which we consume from queues.

Can be either string alias, or a cycle strategy class

  • round_robin (round_robin_cycle).

    Make sure each queue has an equal opportunity to be consumed from.

  • sorted (sorted_cycle).

    Consume from queues in alphabetical order. If the first queue in the sorted list always contains messages, then the rest of the queues will never be consumed from.

  • priority (priority_cycle).

    Consume from queues in original order, so that if the first queue always contains messages, the rest of the queues in the list will never be consumed from.

The default is to consume from queues in round robin.

Channel.sep = u'\x06\x16'
Channel.socket_connect_timeout = None
Channel.socket_keepalive = None
Channel.socket_keepalive_options = None
Channel.socket_timeout = None
Channel.subclient[source]

Pub/Sub connection used to consume fanout queues.

Channel.supports_fanout = True
Channel.unacked_index_key = u'unacked_index'
Channel.unacked_key = u'unacked'
Channel.unacked_mutex_expire = 300
Channel.unacked_mutex_key = u'unacked_mutex'
Channel.unacked_restore_limit = None
Channel.visibility_timeout = 3600