istox 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/istox/helpers/bunny_boot.rb +8 -3
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fc3359a8ef0d3f3087ac19a382173e286f7afb86bd8873e2900f49d72d19fa9
|
4
|
+
data.tar.gz: 1671921fcbc238976d7ca0a91d6f0e63b1e37a43549c14d36ed604ba9a7c9a7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeaf50955d5a51277e6d98f186784aceff0c857c2de7706e240c45efc121eb17c0d0907021a3efe5a8a1c972c0315224a142f4c13c81cfec9ac35106edb9bdeb
|
7
|
+
data.tar.gz: db41a861e42b027a331a9bdbc5d415548643823ff1bedd1ad9a9210b98ea938d20ff408a40e16595697a69b341d56c2768249d0a28d40cec6f961f12d6ef9d65
|
@@ -33,8 +33,13 @@ module Istox
|
|
33
33
|
config.name,
|
34
34
|
durable: config.durable
|
35
35
|
).bind(exchange(config.exchange, exchange_type), options)
|
36
|
+
|
37
|
+
manual_ack = true
|
38
|
+
if !config.manual_ack.nil?
|
39
|
+
manual_ack = config.manual_ack
|
40
|
+
end
|
36
41
|
|
37
|
-
queue.subscribe do |delivery_info, metadata, payload|
|
42
|
+
queue.subscribe manual_ack: manual_ack, block: true do |delivery_info, metadata, payload|
|
38
43
|
begin
|
39
44
|
Rails.logger.info("Processing in consumer: #{klass}")
|
40
45
|
klass.new.process(
|
@@ -42,10 +47,10 @@ module Istox
|
|
42
47
|
metadata,
|
43
48
|
delivery_info
|
44
49
|
)
|
50
|
+
$channel.ack(delivery_info.delivery_tag) if manual_ack
|
45
51
|
rescue Exception => e
|
46
52
|
Rails.logger.error(e)
|
47
|
-
|
48
|
-
$channel.ack(delivery_info.delivery_tag) if config.manual_ack
|
53
|
+
channel.nack(delivery_info.delivery_tag, false, true)
|
49
54
|
end
|
50
55
|
end
|
51
56
|
end
|
data/lib/istox/version.rb
CHANGED