codeclimate-kafka 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/kafka/consumer.rb +8 -10
- data/lib/cc/kafka/offset_storage/memory.rb +0 -4
- data/lib/cc/kafka/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e979e4e1f14b27092907319b5495296608b01174
|
4
|
+
data.tar.gz: 8a302b615bce3b0ff138366abac953a46aa356ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8ba0b2fcfd5866941046d1a9cc26934250750f23e23cae0f2fb70311be19e517665663342c383c96fea256265e4c84db16a0040786e0ad7ae2d2e284007c807
|
7
|
+
data.tar.gz: 1fa178771dbd83c844374e7d54bbb1ebadf1fb1e6852c7ba2e9cf8c549c6736cb2bf6ec2dcf27d70b1f41a57fbe2810d3ecb48989eeb74bc40079fb5a9e48467
|
data/lib/cc/kafka/consumer.rb
CHANGED
@@ -95,16 +95,14 @@ module CC
|
|
95
95
|
Kafka.statsd.time("messages.processing") do
|
96
96
|
set_offset(message.offset + 1)
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
@on_message.call(data)
|
107
|
-
end
|
98
|
+
data = BSON.deserialize(message.value)
|
99
|
+
data[MESSAGE_OFFSET_KEY] = [
|
100
|
+
@offset.topic,
|
101
|
+
@offset.partition,
|
102
|
+
message.offset,
|
103
|
+
].join("-")
|
104
|
+
|
105
|
+
@on_message.call(data)
|
108
106
|
end
|
109
107
|
Kafka.statsd.increment("messages.processed")
|
110
108
|
end
|
data/lib/cc/kafka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.12
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.12
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|