evt-consumer-postgres 0.4.0.1 → 0.5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93141a1e4c4fbe83365769f5a04d03537f822ec3d4f5f5acbcc8922db698c70c
4
- data.tar.gz: 35be7c4807199a1f776bf05e53e9de52ed995786d05a54d9da957bff80ef35cb
3
+ metadata.gz: 60844427514a24b8c5c53ac8dea4e183443454ccbda024a5f44b0af8175531f5
4
+ data.tar.gz: 4259b520f7ba2f6d02bda3752178086caca48cc795a490a58402a26fe3d42b90
5
5
  SHA512:
6
- metadata.gz: 4d2d27a3be1826af2b9fc559aded68593444f7e6004683d6f58299572514e59dc812b75f5d3a98b774a2c0bbc2f927e19cc86555f351678515251513732782e5
7
- data.tar.gz: 3b06e8a86ec12ed62f69dd3d91b23c40fff35fa07d7c5da17fa7333f7bf6b3302c52fceaecac4a61f361fd415ef6f08d9e003896a23df3625ea1be0649e06f84
6
+ metadata.gz: 00e4a2ad356b11879796662ea0d1247476d528806099a75d5600fca79957d6b266c2ec8ce905b110ca303ecb7a39ba01e5713112582ce6e4700b57722aed1322
7
+ data.tar.gz: 6b7104ff34ee17baaf9a19c7d5f4999917de3843aca8e850a3a91a47b37ecd78950e00c462ad04a33221da3b4d8c8fcde2ca6b6f22f1c00fe5e44d6fd5fe9383
@@ -9,10 +9,16 @@ module Consumer
9
9
  class Incrementing
10
10
  include ::Consumer::Postgres
11
11
 
12
- handler do |message_data|
13
- logger.info { "Handled message (StreamName: #{message_data.stream_name}, GlobalPosition: #{message_data.global_position})" }
14
- logger.debug { message_data.data.pretty_inspect }
12
+ class Handler
13
+ include Messaging::Handle
14
+ include Log::Dependency
15
+
16
+ def handle(message_data)
17
+ logger.info { "Handled message (StreamName: #{message_data.stream_name}, GlobalPosition: #{message_data.global_position})" }
18
+ logger.debug { message_data.data.pretty_inspect }
19
+ end
15
20
  end
21
+ handler Handler
16
22
  end
17
23
 
18
24
  class Identifier
@@ -6,21 +6,24 @@ module Consumer
6
6
  end
7
7
  end
8
8
 
9
- def configure(batch_size: nil, session: nil, position_store: nil, condition: nil, **)
10
- MessageStore::Postgres::Get.configure(
11
- self,
12
- batch_size: batch_size,
13
- condition: condition,
14
- session: session
15
- )
9
+ def configure(batch_size: nil, settings: nil, condition: nil)
10
+ MessageStore::Postgres::Session.configure(self, settings: settings)
16
11
 
12
+ session = self.session
17
13
  PositionStore.configure(
18
14
  self,
19
15
  stream_name,
20
- position_store: position_store,
21
16
  consumer_identifier: identifier,
22
17
  session: session
23
18
  )
19
+
20
+ get_session = MessageStore::Postgres::Session.build(settings: settings)
21
+ MessageStore::Postgres::Get.configure(
22
+ self,
23
+ batch_size: batch_size,
24
+ condition: condition,
25
+ session: get_session
26
+ )
24
27
  end
25
28
  end
26
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-consumer-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.1
4
+ version: 0.5.0.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: 2018-09-03 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-consumer
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.7.3
96
+ rubygems_version: 2.7.6
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Postgres implementation of continuous subscription to a stream and message