class Kafka::Consumer
def pause(topic, partition, timeout: nil, max_timeout: nil, exponential_backoff: false)
-
(nil)
-
Parameters:
-
exponential_backoff
(Boolean
) -- whether to enable exponential backoff. -
max_timeout
(nil, Integer
) -- the maximum number of seconds to pause for, -
timeout
(nil, Integer
) -- the number of seconds to pause the partition for, -
partition
(Integer
) -- -
topic
(String
) --
def pause(topic, partition, timeout: nil, max_timeout: nil, exponential_backoff: false) if max_timeout && !exponential_backoff raise ArgumentError, "`max_timeout` only makes sense when `exponential_backoff` is enabled" end pause_for(topic, partition).pause!( timeout: timeout, max_timeout: max_timeout, exponential_backoff: exponential_backoff, ) end