Skip to content

Commit

Permalink
Merge branch 'feat/DEX-2617/support-karafka-2.4.12' into 'master'
Browse files Browse the repository at this point in the history
[DEX-2617] feat: support karafka 2.4.12

Closes DEX-2617

See merge request nstmrt/rubygems/sbmt-kafka_consumer!71
  • Loading branch information
Arlantir committed Sep 30, 2024
2 parents e7f85a7 + 4af5142 commit 713ca79
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

## [3.2.3] - 2024-09-30
## [3.3.0] - 2024-09-30

### Added

- inheritance of kafka settings for topic

### Fixed

- support `karafka 2.4.12`
- properly report metrics for consumer offset lag when partition fetch assignment was lost

## [3.2.2] - 2024-09-23
Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/kafka_consumer/client_configurer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def self.configure!(**opts)
manual_offset_management t.manual_offset_management
consumer t.consumer.consumer_klass
deserializer t.deserializer.instantiate if t.deserializer.klass.present?
kafka t.kafka_options if t.kafka_options.present?
kafka t.kafka_options.merge(inherit: true) if t.kafka_options.present?
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/kafka_consumer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Sbmt
module KafkaConsumer
VERSION = "3.2.3"
VERSION = "3.3.0"
end
end
2 changes: 1 addition & 1 deletion sbmt-kafka_consumer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "rails", ">= 6.1"
spec.add_dependency "zeitwerk", "~> 2.3"
spec.add_dependency "karafka", "~> 2.4", "< 2.4.12"
spec.add_dependency "karafka", "~> 2.4"
spec.add_dependency "yabeda", ">= 0.11"
spec.add_dependency "anyway_config", ">= 2.4.0"
spec.add_dependency "thor"
Expand Down
12 changes: 11 additions & 1 deletion spec/sbmt/kafka_consumer/client_configurer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
hash_including(
active: true,
initial_offset: "earliest",
kafka: {"auto.offset.reset": "latest"},
kafka: hash_including(
"auto.offset.reset": "latest",
"allow.auto.create.topics": true,
"bootstrap.servers": "kafka:9092",
"heartbeat.interval.ms": 5000,
"reconnect.backoff.max.ms": 3000,
"security.protocol": "plaintext",
"session.timeout.ms": 30000,
"socket.connection.setup.timeout.ms": 5000,
"socket.timeout.ms": 30000
),
manual_offset_management: {active: true},
max_messages: 100,
max_wait_time: 1000,
Expand Down

0 comments on commit 713ca79

Please sign in to comment.