rabbit-wq 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91cec0837359ec8af0bc7f4aa137fa56c04a838e
4
- data.tar.gz: 0140c4978115a6b780a36784fa9491596599f1b3
3
+ metadata.gz: 2e4c00af6d964d22dd58180974cf52b007fc59ef
4
+ data.tar.gz: c8e5e2a226d8b0aa58adfb9f22686591a23b0588
5
5
  SHA512:
6
- metadata.gz: 56656b0ce3f4f5c8560f88cf3b58232c13edbc0bb672e525e60cb124c69363cf37a42bc7143189d857b996ff3f702f01e5c55e542943686ef877d49e207775d1
7
- data.tar.gz: 3e3b0edf2df05974078871a591e7440471956bcd63bc008154069fc7ee5c98b8a7b9ddfda00951d43361fb33190d321c87837ba0f516e50917ecb3aa7b24fb09
6
+ metadata.gz: c7625da48b83e72d4335fa966633e46b90e4ffd902ce410101f08cc2fdd996a185d97cc52836699eb32d782e7d613b537e4ead26d0297e0d28df9c97783bcc2b
7
+ data.tar.gz: 1c246a82679d7892e2ea948b2fd14bcdf413669e51aa68583aa93db1b3ffca575e1f3e18b3bf0af2773071bd1844e6b6a49592c3db7e92cb03f05a467cef5bf6
data/README.md CHANGED
@@ -153,6 +153,7 @@ Here is an example configuration file with each option's default value:
153
153
  "threads": 1,
154
154
  "time_zone": "UTC",
155
155
  "work_exchange": "work",
156
+ "work_exchange_type": "fanout",
156
157
  "work_log_level": "info",
157
158
  "work_log_path": "/var/log/rabbit-wq/rabbit-wq-work.log",
158
159
  "work_queue": "work"
@@ -184,6 +185,9 @@ The time zone to use with ActiveRecord.
184
185
  #####work_exchange
185
186
  The name of the work exchange. Defaults to work.
186
187
 
188
+ #####work_exchange_type
189
+ The RabbitMQ exchange type of the work exchange. Defaults to fanout. For more information see [RabbitMQ Docs](https://www.rabbitmq.com/tutorials/amqp-concepts.html).
190
+
187
191
  #####work_log_level
188
192
  The log level of the worker logger. Defaults to info.
189
193
 
@@ -1,3 +1,3 @@
1
1
  module RabbitWQ
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -15,7 +15,10 @@ module RabbitWQ
15
15
  if delay
16
16
  with_channel do |channel|
17
17
  delay_x = channel.direct( "#{RabbitWQ.configuration.delayed_exchange_prefix}-#{delay}ms", durable: true )
18
- work_x = channel.direct( RabbitWQ.configuration.work_exchange, durable: true )
18
+
19
+ work_x = channel.send( RabbitWQ.configuration.work_exchange_type,
20
+ RabbitWQ.configuration.work_exchange,
21
+ durable: true )
19
22
 
20
23
  channel.queue( "#{RabbitWQ.configuration.delayed_queue_prefix}-#{delay}ms",
21
24
  durable: true,
@@ -50,7 +53,10 @@ module RabbitWQ
50
53
  def self.with_work_exchange
51
54
  with_channel do |channel|
52
55
  begin
53
- exchange = channel.direct( RabbitWQ.configuration.work_exchange, durable: true )
56
+ exchange = channel.send( RabbitWQ.configuration.work_exchange_type,
57
+ RabbitWQ.configuration.work_exchange,
58
+ durable: true )
59
+
54
60
  channel.queue( RabbitWQ.configuration.work_queue, durable: true ).tap do |q|
55
61
  q.bind( exchange )
56
62
  yield exchange, q
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit-wq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2014-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler