istox 0.1.156.1 → 0.1.156.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/istox-gem.iml +1852 -2
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/bunny_boot.rb +4 -0
- data/lib/istox/helpers/publisher.rb +16 -6
- data/lib/istox/version.rb +1 -1
- metadata +6 -6
data/Gemfile.lock
CHANGED
@@ -276,6 +276,10 @@ module Istox
|
|
276
276
|
end
|
277
277
|
options_dup.merge!(persistent: persistent)
|
278
278
|
options_dup.merge!(mandatory: mandatory)
|
279
|
+
|
280
|
+
options_dup[:headers] = {} if options[:headers].nil?
|
281
|
+
options_dup[:headers][:sender] = Thread.current.object_id
|
282
|
+
|
279
283
|
# message.merge!(locale: I18n.locale)
|
280
284
|
|
281
285
|
publisher_interceptors.each do |interceptor|
|
@@ -174,8 +174,8 @@ module Istox
|
|
174
174
|
# when an unroutable message is returned, the BasicReturn is fired first and then an ack is sent, firing the BasicAck second.
|
175
175
|
# So if the current status is unroutable then we need to make sure that we don't overwrite that status with Success (ack).
|
176
176
|
ex.on_return do |return_info, properties, content|
|
177
|
-
return_info = return_info.to_hash
|
178
|
-
properties = properties.to_hash
|
177
|
+
return_info = return_info.to_hash.deep_symbolize_keys
|
178
|
+
properties = properties.to_hash.deep_symbolize_keys
|
179
179
|
log.debug "Got a returned message info: #{return_info}"
|
180
180
|
log.debug "Got a returned message properties: #{properties}"
|
181
181
|
log.debug "Got a returned message content: #{content}"
|
@@ -186,9 +186,14 @@ module Istox
|
|
186
186
|
::Istox::BunnyBoot.update_tracker_incr_retry(key)
|
187
187
|
end
|
188
188
|
=end
|
189
|
-
|
190
|
-
|
191
|
-
|
189
|
+
if properties[:headers] && properties[:headers][:sender]
|
190
|
+
@error = Hash.new if @error.nil?
|
191
|
+
tid = properties[:headers][:sender]
|
192
|
+
@error[tid] = Hash.new if @error[Thread.current.object_id].nil?
|
193
|
+
@error[tid][:return_info] = return_info
|
194
|
+
@error[tid][:properties] = properties
|
195
|
+
@error[tid][:content] = content
|
196
|
+
end
|
192
197
|
end
|
193
198
|
|
194
199
|
exchanges[id] = ex
|
@@ -247,7 +252,12 @@ module Istox
|
|
247
252
|
log.debug("Message confirm success: remove message for #{channel_id}")
|
248
253
|
# ::Istox::BunnyBoot.del_tracker_on_channel channel_id
|
249
254
|
# republish(ex, options, message)
|
250
|
-
|
255
|
+
if @error.nil? || @error[Thread.current.object_id].nil?
|
256
|
+
true
|
257
|
+
else
|
258
|
+
@error[Thread.current.object_id] = nil
|
259
|
+
republish(ex,options,message)
|
260
|
+
end
|
251
261
|
else
|
252
262
|
ex.channel.nacked_set.each do |n|
|
253
263
|
log.debug("Publish Error: UNACK delivery tag is #{n}, republish message")
|
data/lib/istox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: istox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.156.
|
4
|
+
version: 0.1.156.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -524,7 +524,7 @@ files:
|
|
524
524
|
homepage: http://www.abc.com
|
525
525
|
licenses: []
|
526
526
|
metadata: {}
|
527
|
-
post_install_message:
|
527
|
+
post_install_message:
|
528
528
|
rdoc_options: []
|
529
529
|
require_paths:
|
530
530
|
- lib
|
@@ -539,8 +539,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
539
539
|
- !ruby/object:Gem::Version
|
540
540
|
version: '0'
|
541
541
|
requirements: []
|
542
|
-
rubygems_version: 3.0.
|
543
|
-
signing_key:
|
542
|
+
rubygems_version: 3.0.8
|
543
|
+
signing_key:
|
544
544
|
specification_version: 4
|
545
545
|
summary: istox backend shared gem
|
546
546
|
test_files: []
|