eventq_rabbitmq 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eventq_rabbitmq/rabbitmq_eventq_client.rb +7 -2
- data/lib/eventq_rabbitmq/rabbitmq_queue_client.rb +5 -1
- data/lib/eventq_rabbitmq/rabbitmq_queue_worker.rb +5 -1
- data/lib/eventq_rabbitmq/rabbitmq_subscription_manager.rb +4 -1
- data/lib/eventq_rabbitmq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09f3df15e86a9a5939b9b6308c8b84332924bd0f
|
4
|
+
data.tar.gz: a048440d5d90ac15663426817e4e9be5273c66ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b83a74ac81d5ba906bcea57dccba2d256a8bd77ea07e1e16f567746aca56de69d5f00dcacdd3f4a5c0a4d6893e81824e0b5507296dc7dc6568127d13dafafd
|
7
|
+
data.tar.gz: af7753f71b72f42d5a4ba180b2adbe2f7eca222f0583b10b003a9b1fd37fcd02d44ea6f1b92117bfdbfc8922f2d8062dbc50616eef4ba65701041838bbdb336a
|
@@ -3,10 +3,15 @@ module EventQ
|
|
3
3
|
class EventQClient
|
4
4
|
|
5
5
|
def initialize(options={})
|
6
|
-
|
6
|
+
|
7
|
+
if options[:client] == nil
|
8
|
+
raise ':client (QueueClient) must be specified.'
|
9
|
+
end
|
10
|
+
|
11
|
+
@client = options[:client]
|
7
12
|
@queue_manager = QueueManager.new
|
8
13
|
@event_raised_exchange = EventRaisedExchange.new
|
9
|
-
@subscription_manager = options[:subscription_manager]
|
14
|
+
@subscription_manager = options[:subscription_manager]
|
10
15
|
end
|
11
16
|
|
12
17
|
def raise_event(event_type, event)
|
@@ -4,7 +4,11 @@ module EventQ
|
|
4
4
|
|
5
5
|
def initialize(options = {})
|
6
6
|
|
7
|
-
|
7
|
+
if options[:endpoint] == nil
|
8
|
+
raise ':endpoint must be specified.'
|
9
|
+
end
|
10
|
+
|
11
|
+
@endpoint = options[:endpoint]
|
8
12
|
|
9
13
|
@port = Integer(options[:port] || 5672)
|
10
14
|
|
@@ -19,6 +19,10 @@ module EventQ
|
|
19
19
|
|
20
20
|
raise 'Worker is already running.' if running?
|
21
21
|
|
22
|
+
if options[:client] == nil
|
23
|
+
raise ':client (QueueClient) must be specified.'
|
24
|
+
end
|
25
|
+
|
22
26
|
@is_running = true
|
23
27
|
@threads = []
|
24
28
|
|
@@ -26,7 +30,7 @@ module EventQ
|
|
26
30
|
@thread_count.times do
|
27
31
|
thr = Thread.new do
|
28
32
|
|
29
|
-
client = options[:client]
|
33
|
+
client = options[:client]
|
30
34
|
manager = QueueManager.new
|
31
35
|
|
32
36
|
#begin the queue loop for this thread
|
@@ -3,7 +3,10 @@ module EventQ
|
|
3
3
|
class SubscriptionManager
|
4
4
|
|
5
5
|
def initialize(options = {})
|
6
|
-
|
6
|
+
if options[:client] == nil
|
7
|
+
raise ':client (QueueClient) must be specified.'
|
8
|
+
end
|
9
|
+
@client = options[:client]
|
7
10
|
@queue_manager = QueueManager.new
|
8
11
|
@event_raised_exchange = EventQ::EventRaisedExchange.new
|
9
12
|
end
|