evt-consumer 0.2.0.0 → 0.2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/consumer/consumer.rb +1 -3
- data/lib/consumer/subscription.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d085db2d642deffe5fec84b3fcb817a585cfd744
|
4
|
+
data.tar.gz: 98984a954684bd5930fb193a391a6ec791cdc92c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fcfce1877cadf5f018cd9dd1ab749081e8dcb2a6ce49223764a364e01457e854cceafcca7b954dafd2673bbff611a4d0925c0bc064fea08d83f8a67ab78267c
|
7
|
+
data.tar.gz: 2ed8e968fc924ee38e8f3d537d9162693b1123f00ebabe49f3e63c2ee5e35baf48ee48b4c83015563c8c6e14b9781280013a9ad896b1d112800655d777c0c165
|
data/lib/consumer/consumer.rb
CHANGED
@@ -39,8 +39,6 @@ module Consumer
|
|
39
39
|
error_raised error, event_data
|
40
40
|
end
|
41
41
|
|
42
|
-
Virtual::Method.define self, :configure
|
43
|
-
|
44
42
|
def error_raised(error, _)
|
45
43
|
raise error
|
46
44
|
end
|
@@ -67,7 +65,7 @@ module Consumer
|
|
67
65
|
def configure(batch_size: nil, session: nil)
|
68
66
|
logger.trace { "Configuring (Batch Size: #{batch_size}, Session: #{session.inspect})" }
|
69
67
|
|
70
|
-
super
|
68
|
+
super if defined? super
|
71
69
|
|
72
70
|
position_store_class = self.class.position_store_class
|
73
71
|
|
@@ -39,20 +39,20 @@ module Consumer
|
|
39
39
|
end
|
40
40
|
|
41
41
|
handle :resupply do
|
42
|
-
logger.trace { "Resupplying (StreamName: #{
|
42
|
+
logger.trace { "Resupplying (StreamName: #{stream_name}, Position: #{position})" }
|
43
43
|
|
44
44
|
batch = cycle.() do
|
45
|
-
get.(
|
45
|
+
get.(stream_name, position: position)
|
46
46
|
end
|
47
47
|
|
48
48
|
if batch.nil? || batch.empty?
|
49
|
-
logger.debug { "Did not resupply; no events available (StreamName: #{
|
49
|
+
logger.debug { "Did not resupply; no events available (StreamName: #{stream_name}, Position: #{position})" }
|
50
50
|
|
51
51
|
:resupply
|
52
52
|
else
|
53
53
|
self.next_batch = batch
|
54
54
|
|
55
|
-
logger.debug { "Resupplied (StreamName: #{
|
55
|
+
logger.debug { "Resupplied (StreamName: #{stream_name}, Position: #{position}, Batch Size: #{batch.count})" }
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -85,5 +85,9 @@ module Consumer
|
|
85
85
|
|
86
86
|
batch
|
87
87
|
end
|
88
|
+
|
89
|
+
def stream_name
|
90
|
+
stream.name
|
91
|
+
end
|
88
92
|
end
|
89
93
|
end
|