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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62c40fc3b4eae2a68534b211497c7b61f2ab1c18
|
4
|
+
data.tar.gz: f4022849286a64402c6bf03466c28335484cb820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
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)
|
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.
|
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-
|
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
|