diff --git a/lib/racecar/consumer.rb b/lib/racecar/consumer.rb index 044d4b5f..1b5f7708 100644 --- a/lib/racecar/consumer.rb +++ b/lib/racecar/consumer.rb @@ -4,7 +4,7 @@ module Racecar class Consumer - Subscription = Struct.new(:topic, :start_from_beginning, :max_bytes_per_partition, :additional_config) + Subscription = Struct.new(:topic, :start_from_beginning, :additional_config) class << self attr_accessor :max_wait_time @@ -22,19 +22,16 @@ def subscriptions # @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] 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) + subscriptions << Subscription.new(topic, start_from_beginning, additional_config) end end end diff --git a/lib/racecar/consumer_set.rb b/lib/racecar/consumer_set.rb index 73a08d86..c82b1368 100644 --- a/lib/racecar/consumer_set.rb +++ b/lib/racecar/consumer_set.rb @@ -215,7 +215,6 @@ def rdkafka_config(subscription) "client.id" => @config.client_id, "enable.partition.eof" => false, "fetch.max.bytes" => @config.max_bytes, - "message.max.bytes" => subscription.max_bytes_per_partition, "fetch.min.bytes" => @config.fetch_min_bytes, "fetch.wait.max.ms" => @config.max_wait_time_ms, "group.id" => @config.group_id,