rabid_mq 0.1.43 → 0.1.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rabid_mq/publisher.rb +2 -0
- data/lib/rabid_mq/version.rb +1 -1
- data/lib/rabid_mq.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876f18a0ca863c79e2279dbdb452b0e27ebbecf8
|
4
|
+
data.tar.gz: 2720f66312906348017b661ea72df32f23bcfdac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9a3a65c9adc1137f46b484deed119ea52330b497b55693c775d35b2a0425e3933171e79859965efb138793ee11da02363a074edfaef7c592f2df5d7809b692e
|
7
|
+
data.tar.gz: e4872b8978651ece5c30f5427f24aeffe03c27b905d6a3831ffa832094d97b6ce6897ac41901ec66583532b1c93b389ab3af9a5bb67e1f6f91ec3b72331b2985
|
data/lib/rabid_mq/publisher.rb
CHANGED
@@ -46,6 +46,8 @@ module RabidMQ
|
|
46
46
|
def topic_exchange(topic, include_environment_name: true, **options)
|
47
47
|
topic_name = include_environment_name ? name_with_env(topic) : topic
|
48
48
|
channel.topic(topic_name, **options)
|
49
|
+
rescue Bunny::PreconditionFailed => e
|
50
|
+
topic_exchange(topic, include_environment_name: include_environment_name, durable: !options.fetch(:durable), **options)
|
49
51
|
end
|
50
52
|
|
51
53
|
# Provide fanout exchange
|
data/lib/rabid_mq/version.rb
CHANGED
data/lib/rabid_mq.rb
CHANGED
@@ -15,13 +15,17 @@ module RabidMQ
|
|
15
15
|
class << self
|
16
16
|
|
17
17
|
# Provide a topic exchange on demand connected to the existing channel
|
18
|
-
def topic_exchange(topic, **options)
|
19
|
-
|
18
|
+
def topic_exchange(topic, include_environment_name: true, **options)
|
19
|
+
topic_name = include_environment_name ? name_with_env(topic) : topic
|
20
|
+
channel.topic(topic_name, **options)
|
21
|
+
rescue Bunny::PreconditionFailed => e
|
22
|
+
topic_exchange(topic, include_environment_name: include_environment_name, durable: !options.fetch(:durable), **options)
|
20
23
|
end
|
21
24
|
|
22
25
|
# Provide fanout exchange
|
23
|
-
def fanout_exchange(topic, **options)
|
24
|
-
|
26
|
+
def fanout_exchange(topic, include_environment_name: true, **options)
|
27
|
+
topic_name = include_environment_name ? name_with_env(topic) : topic
|
28
|
+
channel.fanout(topic_name, **options)
|
25
29
|
end
|
26
30
|
|
27
31
|
# Get a channel with the Bunny::Session
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabid_mq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyrone Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|