istox 0.1.157.3 → 0.1.157.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/bunny_boot.rb +1 -0
- data/lib/istox/helpers/subscriber.rb +6 -5
- data/lib/istox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a53c518ee4af451a0f8ecaa02b54c6fa97042ed010b80a48dd8b97dca453d343
|
4
|
+
data.tar.gz: 776047d059b8850e17cfc71a746ebff9ffa90d9d14d913037c0ec2decb36a982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7acdd2b8360f2382226a6b2bb829b44cccc0585903d8fb35b847a3e859c3cd0313e2b619747988b151adc4a0426d158b93a128e601d665ab0cacc9166e9cdd7
|
7
|
+
data.tar.gz: 365b455ea32d5c2f69adb03fd328acdd05d1808b25baadcbe463bec4da3a9294cfcd1b614beda21cbce4470294463f069915c4303f6050363a1ac28753568b78
|
data/Gemfile.lock
CHANGED
@@ -262,6 +262,7 @@ module Istox
|
|
262
262
|
# For persistence, if exchange is durable, persistent is enabled
|
263
263
|
# For mandatory. if channel is confirmed mode, mandatory is enabled
|
264
264
|
persistent = e.durable?
|
265
|
+
persistent = true if eid(e) == :default
|
265
266
|
mandatory = channel_confirm? e.channel
|
266
267
|
options_dup = options.clone
|
267
268
|
|
@@ -51,8 +51,12 @@ module Istox
|
|
51
51
|
queue_name = ::Istox::BunnyBoot.queue_name consumer_key
|
52
52
|
queue_durable = ::Istox::BunnyBoot.queue_durable? consumer_key
|
53
53
|
queue_exclusive = ::Istox::BunnyBoot.queue_exclusive consumer_key
|
54
|
+
priority = ::Istox::BunnyBoot.queue_priority consumer_key
|
55
|
+
arguments = {}
|
56
|
+
arguments['x-max-priority'] = priority unless priority.nil?
|
57
|
+
|
54
58
|
begin
|
55
|
-
queue = active_channel.queue(queue_name, durable: queue_durable, exclusive: queue_exclusive || false)
|
59
|
+
queue = active_channel.queue(queue_name, durable: queue_durable, exclusive: queue_exclusive || false, arguments: arguments)
|
56
60
|
rescue Bunny::PreconditionFailed => e
|
57
61
|
# Must re-open a new channel, because now channel is already closed
|
58
62
|
active_channel = ::Istox::BunnyBoot.channel(::Istox::BunnyBoot.connection, pool_size: pool_size, prefetch: prefetch)
|
@@ -105,10 +109,7 @@ module Istox
|
|
105
109
|
end
|
106
110
|
end
|
107
111
|
# Subscribe queue
|
108
|
-
|
109
|
-
arguments = {}
|
110
|
-
arguments['x-max-priority'] = priority unless priority.nil?
|
111
|
-
queue.subscribe manual_ack: manual_ack, arguments: arguments do |delivery_info, metadata, payload|
|
112
|
+
queue.subscribe manual_ack: manual_ack do |delivery_info, metadata, payload|
|
112
113
|
# For retried message, if reaching retry count limit, return ack anyway
|
113
114
|
# If retry limit is -1, no retry limit
|
114
115
|
# TODO: No matter the amount of retry limit, send cloudwatch critical alarm if fails after 3 times of retry
|
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.157.
|
4
|
+
version: 0.1.157.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|