Kombu.Transport.Redis.Poller (Kombu v0.1.0)

Copy Markdown View Source

Multi-channel event poller for Redis (kombu.transport.redis.MultiChannelPoller).

Coordinates consuming across one or more Kombu.Transport.Redis.Channel processes, handling both list-based queues (BRPOP / RPOP) and fanout Pub/Sub subscriptions.

Summary

Functions

Polls registered channels until a message is delivered or timeout (in seconds) expires. Raises Kombu.TimeoutError on timeout or when no channels have active consumers.

Types

t()

@type t() :: %Kombu.Transport.Redis.Poller{
  after_read: [(-> any())],
  channels: [pid()],
  cycle_pos: non_neg_integer()
}

Functions

add_after_read(poller, fun)

@spec add_after_read(t(), (-> any())) :: t()

new(channels \\ [])

@spec new([pid()]) :: t()

poll(poller, opts)

@spec poll(t(), keyword()) :: {:ok, t()}

Polls registered channels until a message is delivered or timeout (in seconds) expires. Raises Kombu.TimeoutError on timeout or when no channels have active consumers.

register(poller, channel)

@spec register(t(), pid()) :: t()

unregister(poller, channel)

@spec unregister(t(), pid()) :: t()