View Source ExRocketmq.Producer.Selector.RoundRobin (lib_oss v0.1.0)

Implements round-robin MessageQueue selection for the ExRocketmq Producer.

It maintains an internal counter via an Agent to track the next queue index. On each select/3 call, it returns the queue at the current index and increments the counter.

To use this round-robin selector, pass the ExRocketmq.Producer.Selector.RoundRobin module as the :selector option when constructing a Producer:

producer = ExRocketmq.Producer.start_link(

selector: ExRocketmq.Producer.Selector.RoundRobin.new([])

)

Summary

Types

@type t() :: %ExRocketmq.Producer.Selector.RoundRobin{pid: pid()}

Functions