lib/racecar/consumer.rb
# Adds one or more topic subscriptions.
#
# Can be called multiple times in order to subscribe to more topics.
#
# @param topics [String] one or more topics to subscribe to.
# @param start_from_beginning [Boolean] whether to start from the beginning or the end
#   of each partition.
# @param max_bytes_per_partition [Integer] the maximum number of bytes to fetch from
#   each partition at a time.
# @param additional_config [Hash] Configuration properties for consumer.
#   See https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
# @return [nil]
Adds one or more topic subscriptions.
Can be called multiple times in order to subscribe to more topics.
Adds one or more topic subscriptions . Can be called multiple times in order to subscribe to more topics .
def subscribes_to(*topics, start_from_beginning: true, max_bytes_per_partition: 1048576, additional_config: {})
        topics.each do |topic|
          subscriptions << Subscription.new(topic, start_from_beginning, max_bytes_per_partition, additional_config)
        end
      end
def subscribes_to ( * topics , start_from_beginning : true , max_bytes_per_partition : 1048576 , additional_config : { } ) topics . each do | topic | subscriptions << Subscription . new ( topic , start_from_beginning , max_bytes_per_partition , additional_config ) end end
Adds one or more topic subscriptions.
Adds one or more topic subscriptions .
None
nil
topics
one or more topics to subscribe to.
one or more topics to subscribe to .
start_from_beginning
whether to start from the beginning or the end of each partition.
whether to start from the beginning or the end of each partition .
max_bytes_per_partition
the maximum number of bytes to fetch from each partition at a time.
the maximum number of bytes to fetch from each partition at a time .
additional_config
Configuration properties for consumer.
Configuration properties for consumer .