ruby-kafka 0.7.1.messagecorruptiondebug → 0.7.1.possible.pre.fetch.pre.fix
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -3
- data/lib/kafka/broker.rb +1 -19
- data/lib/kafka/client.rb +1 -9
- data/lib/kafka/cluster.rb +0 -1
- data/lib/kafka/datadog.rb +2 -10
- data/lib/kafka/fetcher.rb +1 -1
- data/lib/kafka/version.rb +1 -1
- data/ruby-kafka.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15856fc831de82f3aeacd6ad834deb9a4ecd557f44ee3569601e4c587a5d2926
|
4
|
+
data.tar.gz: 7a715d38c914fa465166377ce780523db8484c4c9f72b13d4127be435e50fa7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc8350cf6c9dc5ee7390e5df7baecaaf62b607295592e68ca0440d86c0032d07bb9e36031b691784f967bd16191dbd366b8f008b58aadd3c8e2d4604950b330
|
7
|
+
data.tar.gz: fb86ae6fcb3bf1d729919c6f172d033f00fce855e349360fb95d934b13e9e0acf0d5cdc58813c57d80b5467f89c3d744f93fb87ab8c49d5e27ec11bee074ff87
|
data/CHANGELOG.md
CHANGED
@@ -4,11 +4,10 @@ Changes and additions to the library will be listed here.
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
+
- Fix consuming duplication due to redundant messages returned from Kafka (#636).
|
8
|
+
|
7
9
|
## 0.7.1
|
8
10
|
|
9
|
-
- Compatibility with dogstatsd-ruby v4.0.0.
|
10
|
-
- Fix consuming duplication due to redundant messages returned from Kafka (#636).
|
11
|
-
- Fresh cluster info on fetch error (#641).
|
12
11
|
- Exactly Once Delivery and Transactional Messaging Support (#608).
|
13
12
|
- Support extra client certificates in the SSL Context when authenticating with Kafka (#633).
|
14
13
|
|
data/lib/kafka/broker.rb
CHANGED
@@ -71,25 +71,7 @@ module Kafka
|
|
71
71
|
def produce(**options)
|
72
72
|
request = Protocol::ProduceRequest.new(**options)
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
return if resp.nil?
|
77
|
-
|
78
|
-
if (_topic_info, partition_info = resp.each_partition.find {|topic_info, part_info| part_info.error_code == 2 })
|
79
|
-
|
80
|
-
@logger.error "Corrupt message code received for #{request} to partition #{partition_info.partition}"
|
81
|
-
|
82
|
-
#{"topic" => {"partition" => [message, message] }}
|
83
|
-
request.messages_for_topics.each do |topic, messages_for_partition|
|
84
|
-
messages_for_partition.fetch(partition_info.partition, []).each do |message|
|
85
|
-
@logger.error "Message key: #{message.key}"
|
86
|
-
@logger.error "Message value: #{message.value}"
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
resp
|
74
|
+
send_request(request)
|
93
75
|
end
|
94
76
|
|
95
77
|
def fetch_offsets(**options)
|
data/lib/kafka/client.rb
CHANGED
@@ -618,15 +618,7 @@ module Kafka
|
|
618
618
|
#
|
619
619
|
# @return [Array<String>] the list of topic names.
|
620
620
|
def topics
|
621
|
-
|
622
|
-
begin
|
623
|
-
attempts += 1
|
624
|
-
@cluster.list_topics
|
625
|
-
rescue Kafka::ConnectionError
|
626
|
-
@cluster.mark_as_stale!
|
627
|
-
retry unless attempts > 1
|
628
|
-
raise
|
629
|
-
end
|
621
|
+
@cluster.list_topics
|
630
622
|
end
|
631
623
|
|
632
624
|
# Lists all consumer groups in the cluster
|
data/lib/kafka/cluster.rb
CHANGED
data/lib/kafka/datadog.rb
CHANGED
@@ -40,7 +40,7 @@ module Kafka
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def host
|
43
|
-
@host ||=
|
43
|
+
@host ||= ::Datadog::Statsd::DEFAULT_HOST
|
44
44
|
end
|
45
45
|
|
46
46
|
def host=(host)
|
@@ -49,7 +49,7 @@ module Kafka
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def port
|
52
|
-
@port ||=
|
52
|
+
@port ||= ::Datadog::Statsd::DEFAULT_PORT
|
53
53
|
end
|
54
54
|
|
55
55
|
def port=(port)
|
@@ -77,14 +77,6 @@ module Kafka
|
|
77
77
|
|
78
78
|
private
|
79
79
|
|
80
|
-
def default_host
|
81
|
-
::Datadog::Statsd.const_defined?(:Connection) ? ::Datadog::Statsd::Connection::DEFAULT_HOST : ::Datadog::Statsd::DEFAULT_HOST
|
82
|
-
end
|
83
|
-
|
84
|
-
def default_port
|
85
|
-
::Datadog::Statsd.const_defined?(:Connection) ? ::Datadog::Statsd::Connection::DEFAULT_PORT : ::Datadog::Statsd::DEFAULT_PORT
|
86
|
-
end
|
87
|
-
|
88
80
|
def clear
|
89
81
|
@statsd && @statsd.close
|
90
82
|
@statsd = nil
|
data/lib/kafka/fetcher.rb
CHANGED
data/lib/kafka/version.rb
CHANGED
data/ruby-kafka.gemspec
CHANGED
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_development_dependency "extlz4"
|
42
42
|
spec.add_development_dependency "colored"
|
43
43
|
spec.add_development_dependency "rspec_junit_formatter", "0.2.2"
|
44
|
-
spec.add_development_dependency "dogstatsd-ruby", ">= 3.0.0", "<
|
44
|
+
spec.add_development_dependency "dogstatsd-ruby", ">= 3.0.0", "<4.0.0"
|
45
45
|
spec.add_development_dependency "statsd-ruby"
|
46
46
|
spec.add_development_dependency "ruby-prof"
|
47
47
|
spec.add_development_dependency "timecop"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.1.
|
4
|
+
version: 0.7.1.possible.pre.fetch.pre.fix
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: digest-crc
|
@@ -201,7 +201,7 @@ dependencies:
|
|
201
201
|
version: 3.0.0
|
202
202
|
- - "<"
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
204
|
+
version: 4.0.0
|
205
205
|
type: :development
|
206
206
|
prerelease: false
|
207
207
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -211,7 +211,7 @@ dependencies:
|
|
211
211
|
version: 3.0.0
|
212
212
|
- - "<"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
214
|
+
version: 4.0.0
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: statsd-ruby
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|