action_subscriber 5.0.1 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d536caaacd4d83c8285513c8109a18c2acc161c8
4
- data.tar.gz: cae0d50e2d930a4f1b2b865edc7abf3959e73e9f
3
+ metadata.gz: 4c2ce0b5789687cc8b7eaded44e031397e8c1dab
4
+ data.tar.gz: 65120e0f0d0ab4a61e61cd345328e61edbd26437
5
5
  SHA512:
6
- metadata.gz: 2233e1f8f39da395b3c82f3080478ee6d6af972f6ded14571c14518a89b9a8b45ddcbf5f86b6b0c193131dbb956db30c9cab9c8d35e1e090bf53bffb44d6000b
7
- data.tar.gz: 44729b9fcddaac1e45075f4790e6cafcf98dcb033d75fb96238dc504a05f47fbf131771c2a279b2f273652aee4d2672aa633a13e9ca1ef798c1c3c89b5622f2a
6
+ metadata.gz: aa163dea8481ad2f701970bedc7f9675f65de5b6b0a62824c07926075f724f7f0b75308074ce22b9ea55ad3513e9cbc4a13aacf5cbd32a6b37e3964674db6e49
7
+ data.tar.gz: 02f818f0a770f553e5b172bfb031c8c6b3c662ededa7b5f34020e98a90dbad5d1dd451a59a1fdf18f34a6efd03b9d89b0174d7e55975be49e696da49f826bc31
data/README.md CHANGED
@@ -125,17 +125,26 @@ In an initializer, you can set the host and the port like this :
125
125
  Other configuration options include :
126
126
 
127
127
  * config.add_decoder - add a custom decoder for a custom content type
128
+ * config.allow_low_priority_methods - Subscribe to `*_low` queues in addition to normal queues.
129
+ * config.connection_reaping_interval - Connection reaping interval when using a project ActiveRecord
130
+ * config.connection_reaping_timeout_interval - Connection reaping timeout interval when using a project ActiveRecord
128
131
  * config.default_exchange - set the default exchange that your queues will use, using the default RabbitMQ exchange is not recommended
129
132
  * config.error_handler - handle error like you want to handle them!
130
133
  * config.heartbeat - number of seconds between hearbeats (default 5) [see bunny documentation for more details](http://rubybunny.info/articles/connecting.html)
131
134
  * config.hosts - an array of hostnames in your cluster (ie `["rabbit1.myapp.com", "rabbit2.myapp.com"]`)
132
- * config.threadpool_size - set the number of threads availiable to action_subscriber
135
+ * config.network_recovery_interval - reconnection interval for TCP connection failures (default 1)
136
+ * config.password - RabbitMQ password (default "guest")
137
+ * config.prefetch - number of messages to hold in the local queue in subscriber mode
138
+ * config.seconds_to_wait_for_graceful_shutdown - time to wait before force stopping server after shutdown signal
139
+ * config.threadpool_size - set the number of threads available to action_subscriber
133
140
  * config.timeout - how many seconds to allow rabbit to respond before timing out
134
141
  * config.tls - true/false whether to use TLS when connecting to the server
135
142
  * config.tls_ca_certificats - a list of ca certificates to use for verifying the servers TLS certificate
136
143
  * config.tls_cert - a client certificate to use during the TLS handshake
137
144
  * config.tls_key - a key to use during the TLS handshake
145
+ * config.username - RabbitMQ username (default "guest")
138
146
  * config.verify_peer - whether to attempt to validate the server's TLS certificate
147
+ * config.virtual_host - RabbitMQ virtual host (default "/")
139
148
 
140
149
  > Note: TLS is not handled identically in `bunny` and `march_hare`. The configuration options we provide are passed through as provided. For details on expected behavior please check the `bunny` or `march_hare` documentation based on whether you are running in MRI or jRuby.
141
150
 
@@ -12,6 +12,7 @@ module ActionSubscriber
12
12
  :heartbeat,
13
13
  :host,
14
14
  :hosts,
15
+ :network_recovery_interval,
15
16
  :password,
16
17
  :port,
17
18
  :prefetch,
@@ -27,6 +28,7 @@ module ActionSubscriber
27
28
  :virtual_host
28
29
 
29
30
  CONFIGURATION_MUTEX = ::Mutex.new
31
+ NETWORK_RECOVERY_INTERVAL = 1.freeze
30
32
 
31
33
  DEFAULTS = {
32
34
  :allow_low_priority_methods => false,
@@ -36,6 +38,7 @@ module ActionSubscriber
36
38
  :heartbeat => 5,
37
39
  :host => 'localhost',
38
40
  :hosts => [],
41
+ :network_recovery_interval => NETWORK_RECOVERY_INTERVAL,
39
42
  :password => "guest",
40
43
  :port => 5672,
41
44
  :prefetch => 2,
@@ -3,7 +3,6 @@ require 'thread'
3
3
  module ActionSubscriber
4
4
  module RabbitConnection
5
5
  SUBSCRIBER_CONNECTION_MUTEX = ::Mutex.new
6
- NETWORK_RECOVERY_INTERVAL = 1.freeze
7
6
 
8
7
  def self.subscriber_connected?
9
8
  with_connection{|connection| connection.connected? }
@@ -45,7 +44,7 @@ module ActionSubscriber
45
44
  :continuation_timeout => ::ActionSubscriber.configuration.timeout * 1_000.0, #convert sec to ms
46
45
  :heartbeat => ::ActionSubscriber.configuration.heartbeat,
47
46
  :hosts => ::ActionSubscriber.configuration.hosts,
48
- :network_recovery_interval => NETWORK_RECOVERY_INTERVAL,
47
+ :network_recovery_interval => ::ActionSubscriber.configuration.network_recovery_interval,
49
48
  :pass => ::ActionSubscriber.configuration.password,
50
49
  :port => ::ActionSubscriber.configuration.port,
51
50
  :recover_from_connection_close => true,
@@ -1,3 +1,3 @@
1
1
  module ActionSubscriber
2
- VERSION = "5.0.1"
2
+ VERSION = "5.0.2"
3
3
  end
@@ -4,6 +4,7 @@ describe ::ActionSubscriber::Configuration do
4
4
  specify { expect(subject.default_exchange).to eq("events") }
5
5
  specify { expect(subject.heartbeat).to eq(5) }
6
6
  specify { expect(subject.host).to eq("localhost") }
7
+ specify { expect(subject.network_recovery_interval).to eq(1) }
7
8
  specify { expect(subject.port).to eq(5672) }
8
9
  specify { expect(subject.prefetch).to eq(2) }
9
10
  specify { expect(subject.seconds_to_wait_for_graceful_shutdown).to eq(30) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_subscriber
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2017-10-30 00:00:00.000000000 Z
15
+ date: 2017-12-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport