rabid_mq 0.1.36 → 0.1.37
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 +12 -5
- data/lib/rabid_mq/version.rb +1 -1
- 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: 91618ae8f87b17e3a41de52a57e8d909c30e22a7
|
4
|
+
data.tar.gz: e192092ead5a109c2caeb1f886a3845738a57b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b90d948ca3cb490199709b2b2d09bf6409bf982271a3f982994757a258613815a2b5da00177510d7b4c38c051d1fd1cee98641aaa069dd6d4fdc5b096d0a38d
|
7
|
+
data.tar.gz: 27d99fe75fe1aaece4123065e321b48317eb254e180b4b84e61b3d5ade2ce2c4d50262ccb9304711b808936d6f55d32b55ac83520ae2442a31e7cb223fb8cd4d
|
data/lib/rabid_mq/publisher.rb
CHANGED
@@ -44,7 +44,7 @@ module RabidMQ
|
|
44
44
|
|
45
45
|
# Provide a topic exchange on demand connected to the existing channel
|
46
46
|
def topic_exchange(topic, **options)
|
47
|
-
channel.topic(name_with_env(topic)
|
47
|
+
channel.topic(name_with_env(topic) **options)
|
48
48
|
end
|
49
49
|
|
50
50
|
# Provide fanout exchange
|
@@ -52,10 +52,17 @@ module RabidMQ
|
|
52
52
|
channel.fanout(name_with_env(topic), **options)
|
53
53
|
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
def channel
|
56
|
+
return @channel if @channel && !@channel.closed?
|
57
|
+
@channel = amqp_connect.create_channel
|
58
|
+
rescue Bunny::ChannelAlreadyClosed => e
|
59
|
+
reconnect
|
60
|
+
end
|
61
|
+
|
62
|
+
def reconnect
|
63
|
+
@channel = nil
|
64
|
+
channel
|
65
|
+
end
|
59
66
|
|
60
67
|
# Start a new connection
|
61
68
|
def amqp_connect
|
data/lib/rabid_mq/version.rb
CHANGED
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.37
|
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-03-
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|