evt-consumer 2.2.0.2 → 2.2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/consumer/consumer.rb +1 -1
- data/lib/consumer/controls/get/incrementing.rb +4 -0
- data/lib/consumer/controls/position_store.rb +29 -12
- data/lib/consumer/position_store.rb +3 -0
- data/lib/consumer/postgres +1 -1
- data/lib/consumer/postgres.rb +1 -1
- data/lib/consumer/subscription.rb +3 -3
- data/lib/consumer/subscription/defaults.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7649d0a2b5a09c526df2dfa95cc444d0a0dca2feedd79e760a8911a79c8142e7
|
4
|
+
data.tar.gz: 114bc7cc0fa87601299847b87f0d123b830a0449a3ea63b3e124640d5977f12f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2f6dce7182bb03ec8e1baca18d7bb7184b493b2ef1a94d7132e4ac69a8a81fb28e3f213952bca3ebe973aa7c3a4a2dc2a858362e4faef0df82ef072ff390088
|
7
|
+
data.tar.gz: 8d0df31e833932ad736a62e39381d5c1152c40dbd7b4cbb04f01146ceb9b782f62d0d55779be438433fa40eddc186e57ddaeefda0eb9be464a981b6b7aaf4c1e
|
data/lib/consumer/consumer.rb
CHANGED
@@ -1,24 +1,35 @@
|
|
1
1
|
module Consumer
|
2
2
|
module Controls
|
3
3
|
module PositionStore
|
4
|
-
def self.example
|
5
|
-
|
4
|
+
def self.example(&block)
|
5
|
+
if block.nil?
|
6
|
+
cls = Example
|
7
|
+
else
|
8
|
+
cls = example_class(&block)
|
9
|
+
end
|
10
|
+
|
11
|
+
cls.build
|
6
12
|
end
|
7
13
|
|
8
|
-
|
9
|
-
|
14
|
+
def self.example_class(&block)
|
15
|
+
Class.new do
|
16
|
+
include ::Consumer::PositionStore
|
10
17
|
|
11
|
-
|
18
|
+
def self.build
|
19
|
+
instance = new
|
20
|
+
instance.configure
|
21
|
+
instance
|
22
|
+
end
|
12
23
|
|
13
|
-
|
14
|
-
|
15
|
-
end
|
24
|
+
def configure
|
25
|
+
end
|
16
26
|
|
17
|
-
|
18
|
-
instance = new
|
19
|
-
instance.configure
|
20
|
-
instance
|
27
|
+
class_exec(&block) unless block.nil?
|
21
28
|
end
|
29
|
+
end
|
30
|
+
|
31
|
+
Example = example_class do
|
32
|
+
attr_accessor :telemetry_sink
|
22
33
|
|
23
34
|
def configure
|
24
35
|
self.telemetry_sink = ::Consumer::PositionStore::Telemetry::Sink.new
|
@@ -33,6 +44,12 @@ module Consumer
|
|
33
44
|
def put(_)
|
34
45
|
end
|
35
46
|
end
|
47
|
+
|
48
|
+
module Location
|
49
|
+
def self.example
|
50
|
+
'somePositionStream'
|
51
|
+
end
|
52
|
+
end
|
36
53
|
end
|
37
54
|
end
|
38
55
|
end
|
@@ -3,6 +3,7 @@ module Consumer
|
|
3
3
|
def self.included(cls)
|
4
4
|
cls.class_exec do
|
5
5
|
include Dependency
|
6
|
+
include Virtual
|
6
7
|
include Log::Dependency
|
7
8
|
|
8
9
|
extend Build
|
@@ -13,6 +14,8 @@ module Consumer
|
|
13
14
|
prepend Put
|
14
15
|
|
15
16
|
dependency :telemetry, ::Telemetry
|
17
|
+
|
18
|
+
virtual :location
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
data/lib/consumer/postgres
CHANGED
@@ -1 +1 @@
|
|
1
|
-
lib/consumer/
|
1
|
+
lib/consumer/home/ntl/Projects/consumer-postgres/lib/consumer/postgres
|
data/lib/consumer/postgres.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
lib/consumer/
|
1
|
+
lib/consumer/home/ntl/Projects/consumer-postgres/lib/consumer/postgres.rb
|
@@ -46,20 +46,20 @@ module Consumer
|
|
46
46
|
end
|
47
47
|
|
48
48
|
handle :resupply do
|
49
|
-
logger.trace { "Resupplying (
|
49
|
+
logger.trace { "Resupplying (Stream: #{get.stream_name}, Position: #{position})" }
|
50
50
|
|
51
51
|
batch = poll.() do
|
52
52
|
get.(position)
|
53
53
|
end
|
54
54
|
|
55
55
|
if batch.nil? || batch.empty?
|
56
|
-
logger.debug { "Did not resupply; no events available (
|
56
|
+
logger.debug { "Did not resupply; no events available (Stream: #{get.stream_name}, Position: #{position})" }
|
57
57
|
|
58
58
|
:resupply
|
59
59
|
else
|
60
60
|
self.next_batch = batch
|
61
61
|
|
62
|
-
logger.debug { "Resupplied (
|
62
|
+
logger.debug { "Resupplied (Stream: #{get.stream_name}, Position: #{position}, Batch Size: #{batch.count})" }
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-consumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.0
|
4
|
+
version: 2.2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ntl-actor
|