bps-kafka 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bps/publisher/kafka.rb +6 -2
- data/lib/bps/publisher/kafka_async.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68826145fba6a103c652c008207089c913a18999a41acdcc35082d526a8979b1
|
4
|
+
data.tar.gz: f14e9f89c8ff5d968b744483e381abb41f6b1265d6d696688a31439f0fdbf591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b4d9ae93a101c874f0cd2f0a5f07b7b577e6526de8a3ccc978cd346344d768e354202aa6b4652589334e0a1c56d5a556c1053929b2e3c1a1152d9556911571
|
7
|
+
data.tar.gz: 52d62b30b81d2f18a1098a47eff1314406aef6b371293ca0ef9ae10b17c8fa1a53043e5c21d7490b10717255fbb9408fa1df67879eab36e947cf06fe27782500
|
data/lib/bps/publisher/kafka.rb
CHANGED
@@ -3,8 +3,10 @@ require 'bps/kafka'
|
|
3
3
|
module BPS
|
4
4
|
module Publisher
|
5
5
|
class Kafka < Abstract
|
6
|
-
class Topic
|
6
|
+
class Topic < Abstract::Topic
|
7
7
|
def initialize(producer, topic)
|
8
|
+
super()
|
9
|
+
|
8
10
|
@producer = producer
|
9
11
|
@topic = topic
|
10
12
|
end
|
@@ -14,7 +16,7 @@ module BPS
|
|
14
16
|
after_publish
|
15
17
|
end
|
16
18
|
|
17
|
-
def flush
|
19
|
+
def flush(**)
|
18
20
|
@producer.deliver_messages
|
19
21
|
end
|
20
22
|
|
@@ -78,6 +80,8 @@ module BPS
|
|
78
80
|
# @param [Hash] opts the options.
|
79
81
|
# @see https://www.rubydoc.info/gems/ruby-kafka/Kafka/Client#initialize-instance_method
|
80
82
|
def initialize(broker_addrs, **opts)
|
83
|
+
super()
|
84
|
+
|
81
85
|
@topics = {}
|
82
86
|
@client = ::Kafka.new(broker_addrs, **opts.slice(*CLIENT_OPTS.keys))
|
83
87
|
@producer = init_producer(**opts.slice(*PRODUCER_OPTS.keys))
|
@@ -19,7 +19,7 @@ module BPS
|
|
19
19
|
# trigger a delivery.
|
20
20
|
# @option opts [Integer] :delivery_interval (defaults to: 0) if greater than zero, the number of
|
21
21
|
# seconds between automatic message deliveries.
|
22
|
-
def initialize(broker_addrs, **opts)
|
22
|
+
def initialize(broker_addrs, **opts) # rubocop:disable Lint/UselessMethodDefinition
|
23
23
|
super
|
24
24
|
end
|
25
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bps-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Black Square Media
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bps
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-kafka
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.1.
|
72
|
+
rubygems_version: 3.1.2
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Kafka adapter for bps
|