action_subscriber 5.0.1-java → 5.0.2-java

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: 8c91ea3be1138ff9d028fbd3684c74b4700d2538
4
- data.tar.gz: 523a549c70466525b3e8e7eee1a36c5c531061e6
3
+ metadata.gz: 550970ebdec43b0df87c19be114cefb0891b5a30
4
+ data.tar.gz: e86e9de5eeb3967c93241803b71a8f8669a8f80d
5
5
  SHA512:
6
- metadata.gz: 612c8f4c83412d4eddc36457523fda3fe1b6b5c612a417207e5a88c7c6a0ab753314077bcf433c5319d7beebbe9012a06d14e23efe4fa3b039b6abde0ba6ecc5
7
- data.tar.gz: 2107480a7c91ffd7848e9c5d440bae8be7467205f1dabaa2d92aee14c1747b62fa92d978a66f8339eeee5badce9c9545763efdc78b4495c546e20f855e392548
6
+ metadata.gz: b9de96956df321e997410bd523e6a909e202de9bde46ce33bce7a2c46147f3393bdc5c2d0583e55184836c7434537a3aa42098befe5b066c75eefbe89d2d5012
7
+ data.tar.gz: de52f40b789f9b0d97c3006ed21feaed14ceb96eaaa740b332fd8f4b844205334997dc5acfaa4c4c5dafeb944c8b83e646034732d7fd188c7f011d5822cad5e9
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: java
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
  requirement: !ruby/object:Gem::Requirement