fake-kafka 0.0.1.pre.beta4 → 0.0.1.pre.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/fake/kafka.rb +24 -1
- data/lib/fake/kafka/producer.rb +5 -0
- data/lib/fake/kafka/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bdfcb434946fedc750c592389d1ad6cb0dda65bc3a27f1f8ac6f8d988eedf7e
|
4
|
+
data.tar.gz: ad046e00aae7e2cda16c5fff26db9b23a7972053586ae63dad142b7070202689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f3d3f9feedf485bdd031ea84ede95261e5f94b506d05c492143d4109a18a35b23d0083678f6d815894766acd5df6761d2cd3cd2f1b2c9b45c3fa264e0cf33cc
|
7
|
+
data.tar.gz: bb98b0af40dec1a132e3e68d328241b3b7f9bff3e683ceda5c611573170bc2257326d6f10f5acdebeb3cd0e53b92ab5c903fc66e38b26ea824c77f6781cc677d
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ It is a drop in replacement for ruby-kafka driver, it works as In-memory driver,
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
gem 'fake-kafka'
|
10
|
+
gem 'fake-kafka'
|
11
11
|
```
|
12
12
|
|
13
13
|
And then execute:
|
data/lib/fake/kafka.rb
CHANGED
@@ -30,9 +30,32 @@ module Fake
|
|
30
30
|
Consumer.new(self)
|
31
31
|
end
|
32
32
|
|
33
|
-
|
33
|
+
# https://github.com/zendesk/ruby-kafka/blob/v1.0.0/lib/kafka/client.rb#L248-L261
|
34
|
+
# rubocop:disable Lint/UnusedMethodArgument, Metric/ParameterLists, Layout/LineLength
|
35
|
+
def producer(
|
36
|
+
compression_codec: nil,
|
37
|
+
compression_threshold: 1,
|
38
|
+
ack_timeout: 5,
|
39
|
+
required_acks: :all,
|
40
|
+
max_retries: 2,
|
41
|
+
retry_backoff: 1,
|
42
|
+
max_buffer_size: 1000,
|
43
|
+
max_buffer_bytesize: 10_000_000,
|
44
|
+
idempotent: false,
|
45
|
+
transactional: false,
|
46
|
+
transactional_id: nil,
|
47
|
+
transactional_timeout: 60
|
48
|
+
)
|
34
49
|
Producer.new(self)
|
35
50
|
end
|
51
|
+
# rubocop:enable all
|
52
|
+
|
53
|
+
# https://github.com/zendesk/ruby-kafka/blob/v1.0.0/lib/kafka/client.rb#L307
|
54
|
+
# rubocop:disable Lint/UnusedMethodArgument, Metric/ParameterLists, Layout/LineLength
|
55
|
+
def async_producer(delivery_interval: 0, delivery_threshold: 0, max_queue_size: 1000, max_retries: -1, retry_backoff: 0, **options)
|
56
|
+
producer(**options)
|
57
|
+
end
|
58
|
+
# rubocop:enable all
|
36
59
|
|
37
60
|
# Used to clean in-memory data
|
38
61
|
# Useful between test runs
|
data/lib/fake/kafka/producer.rb
CHANGED
data/lib/fake/kafka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.pre.
|
4
|
+
version: 0.0.1.pre.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Arcila Valenzuela
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 1.3.1
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.0.
|
96
|
+
rubygems_version: 3.0.6
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Fake Kafka Consumer and Producer.
|