active_publisher 1.0.0.pre3-java → 1.0.0.pre4-java

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: ccc19c39b6f46e071b2963f01001593d54bc8793
4
- data.tar.gz: ffffe4bd025d4a653b68a5880303e13890a8ab4b
3
+ metadata.gz: 62c40fc3b4eae2a68534b211497c7b61f2ab1c18
4
+ data.tar.gz: f4022849286a64402c6bf03466c28335484cb820
5
5
  SHA512:
6
- metadata.gz: 9a31296f4d4970603402030b14a2db58a46ef4410669cacca9ff2721733c0ea0830fd56149019ad93f0b9e52c506be2fc678e2f4211d098cba8ee8f8a794ac99
7
- data.tar.gz: 1718c914cd52f075a7259571a88aa354c82bbd462c2e04b7bd8d12c0bf0a5b0187520e3fba2927fd6e41b0bdb9efd27a9f580e1c620d66a7c4beefe24dc668e8
6
+ metadata.gz: 5f35810e0e7c1ac8b56a63a21f7ffde04ff216c93291e4869f39bf157b10382cbd0f3adfdf07d21ab6ba25c6d116f09537859e4e2d6624444848589ae0256b3a
7
+ data.tar.gz: d67ffe6a6e10a15195f9ea95098e4aee107b3abfea33250a0812be768532d04c1c09491e9d9e1f08da0575eb72c4b9d44f2c99e0f69d27128ae6c6265c81dc3c
@@ -86,25 +86,27 @@ module ActivePublisher
86
86
  end
87
87
 
88
88
  def publish_all(channel, exchange_name, messages)
89
- exchange = channel.topic(exchange_name)
90
- potentially_retry = []
91
- loop do
92
- break if messages.empty?
93
- message = messages.shift
94
-
95
- fail ActivePublisher::UnknownMessageClassError, "bulk publish messages must be ActivePublisher::Message" unless message.is_a?(ActivePublisher::Message)
96
- fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
97
-
98
- begin
99
- options = ::ActivePublisher.publishing_options(message.route, message.options || {})
100
- exchange.publish(message.payload, options)
101
- potentially_retry << message
102
- rescue
103
- messages << message
104
- raise
89
+ ::ActiveSupport::Notifications.instrument "message_published.active_publisher", :message_count => messages.size do
90
+ exchange = channel.topic(exchange_name)
91
+ potentially_retry = []
92
+ loop do
93
+ break if messages.empty?
94
+ message = messages.shift
95
+
96
+ fail ActivePublisher::UnknownMessageClassError, "bulk publish messages must be ActivePublisher::Message" unless message.is_a?(ActivePublisher::Message)
97
+ fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
98
+
99
+ begin
100
+ options = ::ActivePublisher.publishing_options(message.route, message.options || {})
101
+ exchange.publish(message.payload, options)
102
+ potentially_retry << message
103
+ rescue
104
+ messages << message
105
+ raise
106
+ end
105
107
  end
108
+ wait_for_confirms(channel, messages, potentially_retry)
106
109
  end
107
- wait_for_confirms(channel, messages, potentially_retry)
108
110
  end
109
111
 
110
112
  def wait_for_confirms(channel, messages, potentially_retry)
@@ -1,3 +1,3 @@
1
1
  module ActivePublisher
2
- VERSION = "1.0.0.pre3"
2
+ VERSION = "1.0.0.pre4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre3
4
+ version: 1.0.0.pre4
5
5
  platform: java
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2017-09-01 00:00:00.000000000 Z
15
+ date: 2017-09-05 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement