evt-messaging 0.12.1.0 → 0.12.1.1

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
  SHA1:
3
- metadata.gz: 1dcd549c66946bdb9bf0938561e5fd050e6ae44c
4
- data.tar.gz: b44627bc68be87549b49e21887a2aaf7ed9f4001
3
+ metadata.gz: effcc3ded138daa8b517eb5e80197ad31cf4c7e8
4
+ data.tar.gz: b437208e3d5ab3f8168a9a90cf55b86d2a9f6dd6
5
5
  SHA512:
6
- metadata.gz: fb87314576e00ef7cbb69794af53187bbd8129fb73c269b54afb66828beb07ea5849fdb55910b0056127bb600a97e58b8ec992e00f3eb1639b18048eeb86df22
7
- data.tar.gz: e4422279980669e89965ee602cbed8d7c281b6dce05094e2e84afa515f135690bb16135f9ed4c4ca28a3a62314bae9baa1d020c1215538c9638727a832581efe
6
+ metadata.gz: 308180eda251763d51fad503f66b85dc5faff75063157bf9bc32b98e311c46fad15c4c238557a85f77e93d755fcf3a485b0e0354efd78064c30807e29e76d2fb
7
+ data.tar.gz: 58381e524f1e9cfa439bb887b6059e963166a4b866578a51762f2acce6cbc22d94f070a8b24df6b916c3a7a83b12a878797897ca9aeaea5d87f206cfd77ee7df
@@ -1 +1 @@
1
- messaging.rb
1
+ lib/messaging.rb
@@ -43,11 +43,11 @@ module Messaging
43
43
 
44
44
  def call(message_or_batch, stream_name, expected_version: nil, reply_stream_name: nil)
45
45
  unless message_or_batch.is_a? Array
46
- logger.trace { "Writing message (Stream Name: #{stream_name}, Type: #{message_or_batch.class.message_type}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
46
+ logger.trace(tag: :write) { "Writing message (Stream Name: #{stream_name}, Type: #{message_or_batch.class.message_type}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
47
47
  else
48
- logger.trace { "Writing batch (Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
48
+ logger.trace(tag: :write) { "Writing batch (Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
49
49
  end
50
- logger.trace(tags: [:data, :message]) { message_or_batch.pretty_inspect }
50
+ logger.trace(tags: [:write, :data, :message]) { message_or_batch.pretty_inspect }
51
51
 
52
52
  message_batch = Array(message_or_batch)
53
53
 
@@ -55,11 +55,11 @@ module Messaging
55
55
  last_position = event_writer.(event_data_batch, stream_name, expected_version: expected_version)
56
56
 
57
57
  unless message_or_batch.is_a? Array
58
- logger.info { "Wrote message (Position: #{last_position}, Stream Name: #{stream_name}, Type: #{message_or_batch.class.message_type}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
58
+ logger.info(tag: :write) { "Wrote message (Position: #{last_position}, Stream Name: #{stream_name}, Type: #{message_or_batch.class.message_type}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
59
59
  else
60
- logger.info { "Wrote batch (Position: #{last_position}, Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
60
+ logger.info(tag: :write) { "Wrote batch (Position: #{last_position}, Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
61
61
  end
62
- logger.info(tags: [:data, :message]) { event_data_batch.pretty_inspect }
62
+ logger.info(tags: [:write, :data, :message]) { event_data_batch.pretty_inspect }
63
63
 
64
64
  message_batch.each do |message|
65
65
  telemetry.record :written, Telemetry::Data.new(message, stream_name, expected_version, reply_stream_name)
@@ -92,7 +92,7 @@ module Messaging
92
92
  metadata = message.metadata
93
93
  reply_stream_name = metadata.reply_stream_name
94
94
 
95
- logger.trace { "Replying (Message Type: #{message.message_type}, Stream Name: #{reply_stream_name.inspect})" }
95
+ logger.trace(tags: [:write, :reply]) { "Replying (Message Type: #{message.message_type}, Stream Name: #{reply_stream_name.inspect})" }
96
96
 
97
97
  if reply_stream_name.nil?
98
98
  error_msg = "Message has no reply stream name. Cannot reply. (Message Type: #{message.message_type})"
@@ -104,7 +104,7 @@ module Messaging
104
104
  metadata.clear_reply_stream_name
105
105
 
106
106
  write(message, reply_stream_name).tap do
107
- logger.info { "Replied (Message Type: #{message.message_type}, Stream Name: #{reply_stream_name})" }
107
+ logger.info(tags: [:write, :reply]) { "Replied (Message Type: #{message.message_type}, Stream Name: #{reply_stream_name})" }
108
108
  telemetry.record :replied, Telemetry::Data.new(message, reply_stream_name)
109
109
  end
110
110
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1.0
4
+ version: 0.12.1.1
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: 2017-02-05 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-event_source
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.5.2
92
+ rubygems_version: 2.6.11
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: Messaging primitives for Eventide