evt-consumer 2.3.0.0 → 2.3.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93275cd1c618ed75c10cccc91aa7e5c8a6b0f3cca8afceef0d7d241d4820edef
4
- data.tar.gz: 833c710b283472d05591f52f1c78abe8e19aca73dd519c141956294d3696757a
3
+ metadata.gz: cf9c47da47df09523d2007d47a2bd92aa8463924f327261c0e5a1215efb16a81
4
+ data.tar.gz: 3ce5caed62500286a552af1940b6892e45c2c60ac235acb11bea52ab0ccbd79e
5
5
  SHA512:
6
- metadata.gz: 74baf13ab8a47615e7eb4d5de5e5c5064f53ce9b5506b171becbf145cc802b70ce3641e1dab38bbc8d25f5e17ad73271046e14f4f786441206717795900c42b5
7
- data.tar.gz: 0752efbcb2193628bf5a0456c38ac8d3c4005e7e3fd904b76a147a80051b4f5300eaae27c4380663192334eb0b2854331ee5046754c45785ee3262938618d3e5
6
+ metadata.gz: f3e8b9b68405943aec82c4d2ebc5d6de35419fd8715bee00fab9476e833ec2521e18f3f208c14f3d81dd4038faf255c66b21a1ed8f7f717dd9b0e5c0bc2cdd2d
7
+ data.tar.gz: cde3e28a744e3eefde6367eb7f4425d2faacff56b7b65ccd237d0144079a5b8de1c4b554a7e763e091a38dacb1f0e2c554735add6fa602b135ecefa76f793a90
@@ -37,6 +37,8 @@ module Consumer
37
37
 
38
38
  attr_accessor :session
39
39
 
40
+ attr_accessor :supplemental_settings
41
+
40
42
  dependency :get, MessageStore::Get
41
43
  dependency :position_store, PositionStore
42
44
  dependency :subscription, Subscription
@@ -119,7 +121,7 @@ module Consumer
119
121
  logger.trace(tags: [:consumer, :dispatch, :message]) { "Dispatching message (#{LogText.message_data(message_data)})" }
120
122
 
121
123
  self.class.handler_registry.each do |handler|
122
- handler.(message_data, session: session)
124
+ handler.(message_data, session: session, settings: supplemental_settings)
123
125
  end
124
126
 
125
127
  update_position(message_data.global_position)
@@ -172,13 +174,21 @@ module Consumer
172
174
  end
173
175
 
174
176
  module Build
175
- def build(category, position_update_interval: nil, poll_interval_milliseconds: nil, identifier: nil, **arguments)
177
+ def build(category, position_update_interval: nil, poll_interval_milliseconds: nil, identifier: nil, supplemental_settings: nil, **arguments)
176
178
  instance = new(category)
177
179
 
178
- unless identifier.nil?
180
+ if not identifier.nil?
179
181
  instance.identifier = identifier
180
182
  end
181
183
 
184
+ if not supplemental_settings.nil?
185
+ if not supplemental_settings.is_a?(::Settings)
186
+ supplemental_settings = ::Settings.build(supplemental_settings)
187
+ end
188
+
189
+ instance.supplemental_settings = supplemental_settings
190
+ end
191
+
182
192
  instance.position_update_interval = position_update_interval
183
193
  instance.poll_interval_milliseconds = poll_interval_milliseconds
184
194
 
@@ -1,3 +1,4 @@
1
+ require 'settings/controls'
1
2
  require 'messaging/controls'
2
3
 
3
4
  require 'consumer/controls/category'
@@ -11,7 +12,7 @@ require 'consumer/controls/id'
11
12
  require 'consumer/controls/identifier'
12
13
  require 'consumer/controls/position'
13
14
  require 'consumer/controls/session'
14
- require 'consumer/controls/stream_name'
15
+ require 'consumer/controls/settings'
15
16
 
16
17
  require 'consumer/controls/position_store'
17
18
  require 'consumer/controls/position_store/file'
@@ -19,6 +20,7 @@ require 'consumer/controls/subscription'
19
20
 
20
21
  require 'consumer/controls/handle'
21
22
  require 'consumer/controls/handle/raise_error'
23
+ require 'consumer/controls/handle/settings'
22
24
 
23
25
  require 'consumer/controls/actor'
24
26
 
@@ -59,6 +59,14 @@ module Consumer
59
59
  end
60
60
 
61
61
  Example = self.example_class
62
+
63
+ module Settings
64
+ def self.example_class
65
+ Consumer.example_class(handlers: [Handle::Settings::Example])
66
+ end
67
+
68
+ Example = self.example_class
69
+ end
62
70
  end
63
71
  end
64
72
  end
@@ -0,0 +1,7 @@
1
+ module Consumer
2
+ module Controls
3
+ module Handle
4
+ Settings = ::Messaging::Controls::Handler::Settings
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,13 @@
1
+ module Consumer
2
+ module Controls
3
+ module Settings
4
+ def self.example
5
+ ::Settings.build(data)
6
+ end
7
+
8
+ def self.data
9
+ ::Settings::Controls::Data::Flat::Single.example
10
+ end
11
+ end
12
+ end
13
+ end
@@ -6,6 +6,8 @@ module Consumer
6
6
  end
7
7
 
8
8
  class PositionStore
9
+ include Consumer::PositionStore
10
+
9
11
  attr_accessor :get_position
10
12
  attr_accessor :put_position
11
13
 
@@ -0,0 +1 @@
1
+ lib/consumer/Users/sbellware/projects/eventide/consumer-postgres/lib/consumer/postgres
@@ -0,0 +1 @@
1
+ lib/consumer/Users/sbellware/projects/eventide/consumer-postgres/lib/consumer/postgres.rb
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.3.0.0
4
+ version: 2.3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-01 00:00:00.000000000 Z
11
+ date: 2020-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ntl-actor
@@ -114,6 +114,7 @@ files:
114
114
  - lib/consumer/controls/get/incrementing.rb
115
115
  - lib/consumer/controls/handle.rb
116
116
  - lib/consumer/controls/handle/raise_error.rb
117
+ - lib/consumer/controls/handle/settings.rb
117
118
  - lib/consumer/controls/id.rb
118
119
  - lib/consumer/controls/identifier.rb
119
120
  - lib/consumer/controls/message_data.rb
@@ -123,7 +124,7 @@ files:
123
124
  - lib/consumer/controls/position_store.rb
124
125
  - lib/consumer/controls/position_store/file.rb
125
126
  - lib/consumer/controls/session.rb
126
- - lib/consumer/controls/stream_name.rb
127
+ - lib/consumer/controls/settings.rb
127
128
  - lib/consumer/controls/subscription.rb
128
129
  - lib/consumer/defaults.rb
129
130
  - lib/consumer/handler_registry.rb
@@ -132,6 +133,8 @@ files:
132
133
  - lib/consumer/position_store.rb
133
134
  - lib/consumer/position_store/substitute.rb
134
135
  - lib/consumer/position_store/telemetry.rb
136
+ - lib/consumer/postgres
137
+ - lib/consumer/postgres.rb
135
138
  - lib/consumer/subscription.rb
136
139
  - lib/consumer/subscription/defaults.rb
137
140
  - lib/consumer/subscription/get_batch.rb
@@ -140,7 +143,7 @@ homepage: https://github.com/eventide-project/consumer
140
143
  licenses:
141
144
  - MIT
142
145
  metadata: {}
143
- post_install_message:
146
+ post_install_message:
144
147
  rdoc_options: []
145
148
  require_paths:
146
149
  - lib
@@ -156,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
159
  version: '0'
157
160
  requirements: []
158
161
  rubygems_version: 3.1.2
159
- signing_key:
162
+ signing_key:
160
163
  specification_version: 4
161
164
  summary: Continuous subscription to a category and message dispatching to handlers
162
165
  test_files: []
@@ -1,6 +0,0 @@
1
- ## Consider whether this is still needed after category rename
2
- module Consumer
3
- module Controls
4
- StreamName = Messaging::Controls::StreamName
5
- end
6
- end