deimos-ruby 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96d4d5c0b33f644a070ecd29d3e1060a63b7563e6e753ccf595e10a3126c9597
4
- data.tar.gz: 8908d289256d3297599eb4be447d3858a69f98eb2ca85a0de3b8339f6f105362
3
+ metadata.gz: 32eb1834570b6a1ea7d61274bf35be7365f16f1bb818c5c1148459bbc5a0b87a
4
+ data.tar.gz: eb1ea3e922b947c631f05c0e1a41ce65a3c7a366b42e9b5884de499fff14817b
5
5
  SHA512:
6
- metadata.gz: ab1508cee3db45b7f2674aaef4e7182c0f32ee11711802e11866b129651ac989f56ec47f11c7526e47c7dba02fc0cf399d1186d7a2dfbc0eeb579b290137857b
7
- data.tar.gz: e95a3dbb7b8e60db19796c906d21897f28174cc39c986078778e1ea612d4ab103e2fb94361429b59660dcde24dd55e417dfbe50a2bed1ce76608e86788794e8c
6
+ metadata.gz: f9d27f061f4ddcc3db165c08aaa09c02d80471cfa8b815cb2fc91909a6992615a49697870f517e70fae958d8bd8fa022b2369310f839c5bcba60a415c9a95750
7
+ data.tar.gz: '0578c18592f11f646ae89b44a12c712ef86403b282ce9624c7e3127f5d54ba9f20faa634fd463e03b1287dd84d4bfddbecc2ee20e503a76b2f83a700c491b72e'
@@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
- ## 1.9.1 - 2021-01-29
10
+
11
+ ## 1.9.2 - 2021-01-29
11
12
 
12
13
  - ### Fixes :wrench:
13
14
 
14
- Fix for `uninitialized constant ActiveSupport::Autoload` in certain circumstances
15
+ - Fix for `uninitialized constant ActiveSupport::Autoload` in certain circumstances
16
+ - Removed unnecessary monkey patch which was crashing on newer versions of ruby-kafka
15
17
 
16
18
  ## 1.9.0 - 2021-01-28
17
19
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deimos-ruby (1.9.0)
4
+ deimos-ruby (1.9.1)
5
5
  avro_turf (~> 0.11)
6
6
  phobos (>= 1.9, < 3.0)
7
7
  ruby-kafka (< 2)
@@ -20,7 +20,6 @@ require 'deimos/backends/test'
20
20
 
21
21
  require 'deimos/schema_backends/base'
22
22
 
23
- require 'deimos/monkey_patches/ruby_kafka_heartbeat'
24
23
  require 'deimos/monkey_patches/phobos_producer'
25
24
  require 'deimos/monkey_patches/phobos_cli'
26
25
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.9.1'
4
+ VERSION = '1.9.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
@@ -386,7 +386,6 @@ files:
386
386
  - lib/deimos/metrics/provider.rb
387
387
  - lib/deimos/monkey_patches/phobos_cli.rb
388
388
  - lib/deimos/monkey_patches/phobos_producer.rb
389
- - lib/deimos/monkey_patches/ruby_kafka_heartbeat.rb
390
389
  - lib/deimos/poll_info.rb
391
390
  - lib/deimos/producer.rb
392
391
  - lib/deimos/railtie.rb
@@ -1,85 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kafka
4
- class Heartbeat
5
- def initialize(group:, interval:, instrumenter:)
6
- @group = group
7
- @interval = interval
8
- @last_heartbeat = Time.now
9
- @instrumenter = instrumenter
10
- end
11
-
12
- def trigger!
13
- @instrumenter.instrument('heartbeat.consumer',
14
- group_id: @group.group_id,
15
- topic_partitions: @group.assigned_partitions) do
16
- @group.heartbeat
17
- @last_heartbeat = Time.now
18
- end
19
- end
20
- end
21
-
22
- class Client
23
- def consumer(
24
- group_id:,
25
- session_timeout: 30,
26
- offset_commit_interval: 10,
27
- offset_commit_threshold: 0,
28
- heartbeat_interval: 10,
29
- offset_retention_time: nil,
30
- fetcher_max_queue_size: 100
31
- )
32
- cluster = initialize_cluster
33
-
34
- instrumenter = DecoratingInstrumenter.new(@instrumenter,
35
- group_id: group_id)
36
-
37
- # The Kafka protocol expects the retention time to be in ms.
38
- retention_time = (offset_retention_time && offset_retention_time * 1_000) || -1
39
-
40
- group = ConsumerGroup.new(
41
- cluster: cluster,
42
- logger: @logger,
43
- group_id: group_id,
44
- session_timeout: session_timeout,
45
- retention_time: retention_time,
46
- instrumenter: instrumenter
47
- )
48
-
49
- fetcher = Fetcher.new(
50
- cluster: initialize_cluster,
51
- group: group,
52
- logger: @logger,
53
- instrumenter: instrumenter,
54
- max_queue_size: fetcher_max_queue_size
55
- )
56
-
57
- offset_manager = OffsetManager.new(
58
- cluster: cluster,
59
- group: group,
60
- fetcher: fetcher,
61
- logger: @logger,
62
- commit_interval: offset_commit_interval,
63
- commit_threshold: offset_commit_threshold,
64
- offset_retention_time: offset_retention_time
65
- )
66
-
67
- heartbeat = Heartbeat.new(
68
- group: group,
69
- interval: heartbeat_interval,
70
- instrumenter: instrumenter
71
- )
72
-
73
- Consumer.new(
74
- cluster: cluster,
75
- logger: @logger,
76
- instrumenter: instrumenter,
77
- group: group,
78
- offset_manager: offset_manager,
79
- fetcher: fetcher,
80
- session_timeout: session_timeout,
81
- heartbeat: heartbeat
82
- )
83
- end
84
- end
85
- end