lib/kafka/client.rb
# Creates a new AsyncProducer instance.
#
# All parameters allowed by {#producer} can be passed. In addition to this,
# a few extra parameters can be passed when creating an async producer.
#
# @param max_queue_size [Integer] the maximum number of messages allowed in
#   the queue.
# @param delivery_threshold [Integer] if greater than zero, the number of
#   buffered messages that will automatically trigger a delivery.
# @param delivery_interval [Integer] if greater than zero, the number of
#   seconds between automatic message deliveries.
#
# @see AsyncProducer
# @return [AsyncProducer]
Creates a new AsyncProducer instance.
All parameters allowed by {#producer} can be passed. In addition to this,
a few extra parameters can be passed when creating an async producer.
Creates a new AsyncProducer instance . All parameters allowed by { #producer } can be passed . In addition to this a few extra parameters can be passed when creating an async producer .
def async_producer(delivery_interval: 0, delivery_threshold: 0, max_queue_size: 1000, max_retries: -1, retry_backoff: 0, **options)
      sync_producer = producer(**options)
      AsyncProducer.new(
        sync_producer: sync_producer,
        delivery_interval: delivery_interval,
        delivery_threshold: delivery_threshold,
        max_queue_size: max_queue_size,
        max_retries: max_retries,
        retry_backoff: retry_backoff,
        instrumenter: @instrumenter,
        logger: @logger,
      )
    end
def async_producer ( delivery_interval : 0 , delivery_threshold : 0 , max_queue_size : 1000 , max_retries : - 1 , retry_backoff : 0 , ** options ) sync_producer = producer ( ** options ) AsyncProducer . new ( sync_producer : sync_producer , delivery_interval : delivery_interval , delivery_threshold : delivery_threshold , max_queue_size : max_queue_size , max_retries : max_retries , retry_backoff : retry_backoff , instrumenter : @instrumenter , logger : @logger , ) end
Creates a new AsyncProducer instance.
Creates a new AsyncProducer instance .
None
AsyncProducer
delivery_interval
if greater than zero, the number of seconds between automatic message deliveries.
if greater than zero the number of seconds between automatic message deliveries .
delivery_threshold
if greater than zero, the number of buffered messages that will automatically trigger a delivery.
if greater than zero the number of buffered messages that will automatically trigger a delivery .
max_queue_size
the maximum number of messages allowed in the queue.
the maximum number of messages allowed in the queue .
max_retries
<not_specific>
retry_backoff
<not_specific>
options
<not_specific>
see
None