hutch 0.21.0-java → 0.25.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +11 -12
  5. data/.yardopts +5 -0
  6. data/CHANGELOG.md +118 -1
  7. data/Gemfile +15 -4
  8. data/Guardfile +13 -4
  9. data/README.md +274 -24
  10. data/Rakefile +8 -1
  11. data/hutch.gemspec +6 -7
  12. data/lib/hutch.rb +11 -8
  13. data/lib/hutch/adapters/march_hare.rb +1 -1
  14. data/lib/hutch/broker.rb +113 -110
  15. data/lib/hutch/cli.rb +42 -11
  16. data/lib/hutch/config.rb +209 -59
  17. data/lib/hutch/error_handlers.rb +1 -0
  18. data/lib/hutch/error_handlers/airbrake.rb +44 -16
  19. data/lib/hutch/error_handlers/base.rb +15 -0
  20. data/lib/hutch/error_handlers/honeybadger.rb +33 -18
  21. data/lib/hutch/error_handlers/logger.rb +12 -6
  22. data/lib/hutch/error_handlers/opbeat.rb +30 -0
  23. data/lib/hutch/error_handlers/sentry.rb +14 -6
  24. data/lib/hutch/logging.rb +5 -5
  25. data/lib/hutch/publisher.rb +75 -0
  26. data/lib/hutch/tracers.rb +1 -0
  27. data/lib/hutch/tracers/opbeat.rb +37 -0
  28. data/lib/hutch/version.rb +1 -1
  29. data/lib/hutch/waiter.rb +104 -0
  30. data/lib/hutch/worker.rb +50 -66
  31. data/lib/yard-settings/handler.rb +38 -0
  32. data/lib/yard-settings/yard-settings.rb +2 -0
  33. data/spec/hutch/broker_spec.rb +162 -77
  34. data/spec/hutch/cli_spec.rb +16 -3
  35. data/spec/hutch/config_spec.rb +83 -22
  36. data/spec/hutch/error_handlers/airbrake_spec.rb +25 -10
  37. data/spec/hutch/error_handlers/honeybadger_spec.rb +24 -2
  38. data/spec/hutch/error_handlers/logger_spec.rb +14 -1
  39. data/spec/hutch/error_handlers/opbeat_spec.rb +37 -0
  40. data/spec/hutch/error_handlers/sentry_spec.rb +18 -1
  41. data/spec/hutch/logger_spec.rb +12 -6
  42. data/spec/hutch/waiter_spec.rb +51 -0
  43. data/spec/hutch/worker_spec.rb +33 -4
  44. data/spec/spec_helper.rb +7 -5
  45. data/spec/tracers/opbeat_spec.rb +44 -0
  46. data/templates/default/class/html/settings.erb +0 -0
  47. data/templates/default/class/setup.rb +4 -0
  48. data/templates/default/fulldoc/html/css/hutch.css +13 -0
  49. data/templates/default/layout/html/setup.rb +7 -0
  50. data/templates/default/method_details/html/settings.erb +5 -0
  51. data/templates/default/method_details/setup.rb +4 -0
  52. data/templates/default/method_details/text/settings.erb +0 -0
  53. data/templates/default/module/html/settings.erb +40 -0
  54. data/templates/default/module/setup.rb +4 -0
  55. metadata +41 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ec88cab525084a9336085ec5eda85d8144816aa0
4
- data.tar.gz: 91334a07d5ae533d7f0a1a332536ce1485d3e9f1
2
+ SHA256:
3
+ metadata.gz: 46d709e9c94dfb88ee45ddc94792769e9e6f9f09d1b86adb394e7e18d11db9fa
4
+ data.tar.gz: 7b9e237c3e1f2b199ec42a7c5f39a9a86fb487fcda647d7e41fd87b5be3fe31d
5
5
  SHA512:
6
- metadata.gz: dc0782ac33399218cb0a54c5ab33dc9dd6fc2ebdf816d5ef6f852620d780644005e2545c9d55e380fb14c08f40649cb65de8e250a62ca02918cb1fc67ae988d1
7
- data.tar.gz: 5dd46544d97c5b2bd522327f85240f722cfe1b17911b23b53c0fb3c8210e2c04cb018fb615cbd4f7230c4c3d1376d64d1a09f46ca2cba3555680256007baa98e
6
+ metadata.gz: ef4ed43e500a37036bb7c9507bd42b832e0cf1eb0cbb38474e52652dc42bd5dba76eaa6acb85e30a55910bdaa5c1f076aa08ea0ff769c58769d60fae7d614537
7
+ data.tar.gz: 1db9d47abc7b1b1d6bde0fbd4eca448e0d267ce1dcf11295d85b849c7f8989f8cdec0a9beb3137f4652a38c794e7b6d91aee4188b1edffe3a16c362f33597f9f
data/.gitignore CHANGED
@@ -5,3 +5,6 @@ Gemfile.lock
5
5
  .ruby-gemset
6
6
  .idea
7
7
  coverage
8
+ .yardoc
9
+ doc
10
+ gemfiles/Gemfile.*.lock
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --order random
@@ -1,17 +1,16 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- rvm:
4
- - "2.3.0"
5
- - "2.2"
6
- - "2.1"
7
- - "2.0"
8
- - "jruby-9.0.0.0"
9
-
10
- sudo: false
3
+ before_install:
4
+ - gem install bundler
5
+ matrix:
6
+ include:
7
+ - rvm: 2.4.2
8
+ - rvm: 2.3.5
9
+ - rvm: 2.2.8
10
+ - rvm: jruby-9.1.15.0
11
+ jdk: oraclejdk8
12
+ env:
13
+ - JRUBY_OPTS='--debug'
11
14
 
12
15
  services:
13
16
  - rabbitmq
14
-
15
- matrix:
16
- allow_failures:
17
- - rvm: jruby-9.0.0.0
@@ -0,0 +1,5 @@
1
+ --load "./lib/yard-settings/yard-settings.rb"
2
+ --title "Hutch API docs"
3
+ -
4
+ README.md
5
+
@@ -1,4 +1,121 @@
1
- ## 0.21.0 — (unreleased)
1
+ ## 0.25.0 — (unreleased)
2
+
3
+ No changes yet.
4
+
5
+
6
+
7
+ ## 0.24.0 — February 1st, 2017
8
+
9
+ ### Configurable Consumer Prefixes
10
+
11
+ Hutch consumers now can use user-provided prefixes for consumer tags.
12
+
13
+ Contributed by Dávid Lantos.
14
+
15
+ GitHub issue: [#265](https://github.com/gocardless/hutch/pull/265)
16
+
17
+ ### Signal Handling in Workers
18
+
19
+ Hutch will now handle several OS signals:
20
+
21
+ * `USR2` will log stack traces of all alive VM threads
22
+ * `QUIT` (except on JRuby), `INT`, `TERM` will cause Hutch daemon to shut down
23
+
24
+ Contributed by Olle Jonsson.
25
+
26
+ GitHub issues: [#263](https://github.com/gocardless/hutch/pull/263), [#271](https://github.com/gocardless/hutch/pull/271)
27
+
28
+ ### Opbeat Tracer
29
+
30
+ Hutch now provides a tracer implementation for [Opbeat](https://opbeat.com/).
31
+
32
+ Contributed by Olle Jonsson.
33
+
34
+ GitHub issue: [#262](https://github.com/gocardless/hutch/pull/262)
35
+
36
+ ### `HUTCH_URI` Support
37
+
38
+ The `HUTCH_URI` environment variable now can be used to configure
39
+ Hutch connection URI.
40
+
41
+ Contributed by Sam Stickland.
42
+
43
+ GitHub issue: [#270](https://github.com/gocardless/hutch/pull/270)
44
+
45
+
46
+ ## 0.23.1 — October 20th, 2016
47
+
48
+ This release contains a **breaking change** in the error
49
+ handlers interface.
50
+
51
+ ### All Message Properties Passed to Error Handlers
52
+
53
+ Previously error handlers were provided a message ID as first
54
+ argument to `ErrorHandler#handle`. Now it is a hash of all message
55
+ properties.
56
+
57
+ This is a **breaking public API change**. If you do not use custom
58
+ error handlers, you are not affected.
59
+
60
+ Contributed by Pierre-Louis Gottfrois.
61
+
62
+ GH issue: [hutch#238](https://github.com/gocardless/hutch/pull/238)
63
+
64
+ ### Opbeat Error Handler
65
+
66
+ Contributed by Olle Jonsson.
67
+
68
+
69
+ ## 0.22.1 — June 7th, 2016
70
+
71
+ ### Message Payload is Reported to Sentry
72
+
73
+ Contributed by Matt Thompson.
74
+
75
+ ### Daemonization Flag Ignored on JRuby
76
+
77
+ Hutch will no longer try to daemonize its process on JRuby
78
+ (since it is not supported) and will emit a warning instead.
79
+
80
+ Contributed by Olle Jonsson.
81
+
82
+ ### Custom Setup Steps in Hutch::Worker
83
+
84
+ `Hutch::Worker` now accepts a list of callables that are invoked
85
+ after queue setup.
86
+
87
+ Contributed by Kelly Stannard.
88
+
89
+ ### More Flexible and Better Abstracted Hutch::Broker
90
+
91
+ `Hutch::Broker` was refactored with some bits extracted into separate
92
+ classes or methods, making them easier to override.
93
+
94
+ Contributed by Aleksandar Ivanov and Ryan Hosford.
95
+
96
+ ### Configurable Consumer Thread Pool Exception Handling (MRI only)
97
+
98
+ `:consumer_pool_abort_on_exception` is a new option
99
+ (defaults to `false`) which defines whether Bunny's
100
+ consumer work pool threads should abort on exception.
101
+ The option is ignored on JRuby.
102
+
103
+ Contributed by Seamus Abshere.
104
+
105
+ ### Worker: Log received messages using level DEBUG instead of INFO
106
+
107
+ Received messages used to be logged using severity level INFO.
108
+ This has been lowered to DEBUG.
109
+
110
+ Contributed by Jesper Josefsson.
111
+
112
+ ### Refactoring
113
+
114
+ Olle Jonsson and Kelly Stannard have contributed
115
+ multiple internal improvements that have no behaviour changes.
116
+
117
+
118
+ ## 0.21.0 — February 7th, 2016
2
119
 
3
120
  ### JRuby Compatibility Restored
4
121
 
data/Gemfile CHANGED
@@ -1,19 +1,30 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ ruby RUBY_VERSION
4
+
3
5
  gemspec
4
6
 
5
7
  group :development do
6
8
  gem "rake"
7
- gem "guard", "~> 0.8.8"
8
- gem "guard-rspec", "~> 0.5.4"
9
+ gem "guard", "~> 2.14", platform: :mri_23
10
+ gem "guard-rspec", "~> 4.7", platform: :mri_23
11
+
12
+ gem "yard", "~> 0.9"
13
+ gem 'kramdown', "> 0", platform: :jruby
14
+ gem "redcarpet", "> 0", platform: :mri
15
+ gem "github-markup", "> 0"
9
16
  end
10
17
 
11
18
  group :development, :test do
19
+ gem "rspec", "~> 3.5"
20
+ gem "simplecov", "~> 0.12"
21
+
12
22
  gem "sentry-raven"
13
23
  gem "honeybadger"
14
- gem "coveralls", require: false
24
+ gem "coveralls", "~> 0.8.15", require: false
15
25
  gem "newrelic_rpm"
16
- gem "airbrake"
26
+ gem "airbrake", "~> 7.0"
27
+ gem "opbeat", "~> 3.0.9"
17
28
  end
18
29
 
19
30
  group :development, :darwin do
data/Guardfile CHANGED
@@ -1,5 +1,14 @@
1
- guard 'rspec', :version => 2, :cli => '--color --format doc' do
2
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
4
- watch('spec/spec_helper.rb') { "spec" }
1
+ guard :rspec, cmd: "bundle exec rspec" do
2
+ require "guard/rspec/dsl"
3
+ dsl = Guard::RSpec::Dsl.new(self)
4
+
5
+ # RSpec files
6
+ rspec = dsl.rspec
7
+ watch(rspec.spec_helper) { rspec.spec_dir }
8
+ watch(rspec.spec_support) { rspec.spec_dir }
9
+ watch(rspec.spec_files)
10
+
11
+ # Ruby files
12
+ ruby = dsl.ruby
13
+ dsl.watch_spec_files_for(ruby.lib_files)
5
14
  end
data/README.md CHANGED
@@ -1,29 +1,47 @@
1
1
  ![](http://cl.ly/image/3h0q3F3G142K/hutch.png)
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/hutch.svg)](http://badge.fury.io/rb/hutch)
4
+ [![Build Status](https://travis-ci.org/gocardless/hutch.svg?branch=master)](https://travis-ci.org/gocardless/hutch)
5
+ [![Dependency Status](https://gemnasium.com/gocardless/hutch.svg)](https://gemnasium.com/gocardless/hutch)
6
+ [![Code Climate](https://codeclimate.com/github/gocardless/hutch.svg)](https://codeclimate.com/github/gocardless/hutch)
7
+
3
8
  Hutch is a Ruby library for enabling asynchronous inter-service communication
4
9
  in a service-oriented architecture, using RabbitMQ.
5
10
 
6
- [![Gem Version](https://badge.fury.io/rb/hutch.png)](http://badge.fury.io/rb/hutch)
7
- [![Build Status](https://travis-ci.org/gocardless/hutch.png?branch=master)](https://travis-ci.org/gocardless/hutch)
8
- [![Dependency Status](https://gemnasium.com/gocardless/hutch.png)](https://gemnasium.com/gocardless/hutch)
9
- [![Code Climate](https://codeclimate.com/github/gocardless/hutch.png)](https://codeclimate.com/github/gocardless/hutch)
10
-
11
11
  To install with RubyGems:
12
12
 
13
13
  ```
14
- $ gem install hutch
14
+ gem install hutch
15
15
  ```
16
16
 
17
- ## Project Maturity
17
+ <!-- Tocer[start]: Auto-generated, don't remove. -->
18
18
 
19
- Hutch is a moderately mature project (started in early 2013)
20
- that was extracted from production systems.
19
+ ### Table of Contents
21
20
 
21
+ - [Requirements](#requirements)
22
+ - [Overview](#overview)
23
+ - [Project Maturity](#project-maturity)
24
+ - [Consumers](#consumers)
25
+ - [Message Processing Tracers](#message-processing-tracers)
26
+ - [Running Hutch](#running-hutch)
27
+ - [Loading Consumers](#loading-consumers)
28
+ - [Stopping Hutch](#stopping-hutch)
29
+ - [Producers](#producers)
30
+ - [Producer Configuration](#producer-configuration)
31
+ - [Publisher Confirms](#publisher-confirms)
32
+ - [Writing Well-Behaved Publishers](#writing-well-behaved-publishers)
33
+ - [Configuration](#configuration)
34
+ - [Config File](#config-file)
35
+ - [Environment variables](#environment-variables)
36
+ - [Configuration precedence](#configuration-precedence)
37
+ - [Generated list of configuration options](#generated-list-of-configuration-options)
22
38
 
23
- ## Supported Ruby Versions
39
+ <!-- Tocer[finish]: Auto-generated, don't remove. -->
24
40
 
25
- Hutch requires CRuby 2.0+ or JRuby 9K.
41
+ ## Requirements
26
42
 
43
+ - Hutch requires Ruby 2.0+ or JRuby 9K.
44
+ - Hutch requires RabbitMQ 3.3 or later.
27
45
 
28
46
  ## Overview
29
47
 
@@ -39,8 +57,12 @@ and so on. Publishers connect to RabbitMQ via `Hutch.connect` and publish using
39
57
  Hutch uses [Bunny](http://rubybunny.info) or [March Hare](http://rubymarchhare.info)
40
58
  (on JRuby) under the hood.
41
59
 
60
+ ### Project Maturity
42
61
 
43
- ## Defining Consumers
62
+ Hutch is a moderately mature project (started in early 2013)
63
+ that was extracted from production systems.
64
+
65
+ ## Consumers
44
66
 
45
67
  Consumers receive messages from a RabbitMQ queue. That queue may be bound to
46
68
  one or more topics (represented by routing keys).
@@ -58,8 +80,8 @@ message[:id] # => "02ABCXYZ"
58
80
  To subscribe to a topic, pass a routing key to `consume` in the class
59
81
  definition. To bind to multiple routing keys, simply pass extra routing keys
60
82
  in as additional arguments. Refer to the [RabbitMQ docs on topic exchanges
61
- ][topic-docs] for more information about how to use routing keys. Here's an
62
- example consumer:
83
+ ](http://www.rabbitmq.com/tutorials/tutorial-five-ruby.html) for more information
84
+ about how to use routing keys. Here's an example consumer:
63
85
 
64
86
  ```ruby
65
87
  class FailedPaymentConsumer
@@ -98,7 +120,9 @@ class FailedPaymentConsumer
98
120
  end
99
121
  ```
100
122
 
101
- Custom queue arguments can be found on [this page](https://www.rabbitmq.com/extensions.html).
123
+ This sets the `x-max-length` header. For more details, see the [RabbitMQ
124
+ documentation on Queue Length Limit](https://www.rabbitmq.com/maxlength.html). To find out more
125
+ about custom queue arguments, consult the [RabbitMQ documentation on AMQP Protocol Extensions](https://www.rabbitmq.com/extensions.html).
102
126
 
103
127
  Consumers can write to Hutch's log by calling the logger method. The logger method returns
104
128
  a [Logger object](http://ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.html).
@@ -107,7 +131,7 @@ a [Logger object](http://ruby-doc.org/stdlib-2.1.2/libdoc/logger/rdoc/Logger.htm
107
131
  class FailedPaymentConsumer
108
132
  include Hutch::Consumer
109
133
  consume 'gc.ps.payment.failed'
110
-
134
+
111
135
  def process(message)
112
136
  logger.info "Marking payment #{message[:id]} as failed"
113
137
  mark_payment_as_failed(message[:id])
@@ -136,11 +160,13 @@ to learn more.
136
160
 
137
161
  Tracers allow you to track message processing.
138
162
 
139
- #### NewRelic
163
+ This will enable NewRelic custom instrumentation:
164
+
140
165
  ```ruby
141
166
  Hutch::Config.set(:tracer, Hutch::Tracers::NewRelic)
142
167
  ```
143
- This will enable NewRelic custom instrumentation. Batteries included! Screenshoots available [here](https://monosnap.com/list/557020a000779174f23467e3).
168
+
169
+ Batteries included!
144
170
 
145
171
  ## Running Hutch
146
172
 
@@ -276,10 +302,10 @@ AMQP.connect(host: config[:host]) do |connection|
276
302
  end
277
303
  ```
278
304
 
279
- If using publisher confirms with amqp gem, see [this issue][pc-issue]
280
- and [this gist][pc-gist] for more info.
305
+ If using publisher confirms with amqp gem, see [this issue](https://github.com/ruby-amqp/amqp/issues/92)
306
+ and [this gist](https://gist.github.com/3042381) for more info.
281
307
 
282
- ## Configuration Reference
308
+ ## Configuration
283
309
 
284
310
  ### Config File
285
311
 
@@ -317,10 +343,234 @@ Known configuration parameters are:
317
343
  * `write_timeout`: Bunny's socket write timeout (default: `11`)
318
344
  * `tracer`: tracer to use to track message processing
319
345
 
346
+ ### Environment variables
347
+
348
+ The file configuration options mentioned above can also be passed in via environment variables, using the `HUTCH_` prefix, eg.
349
+
350
+ * `connection_timeout` &rarr; `HUTCH_CONNECTION_TIMEOUT`.
351
+
352
+ ### Configuration precedence
353
+
354
+ In order from lowest to highest precedence:
355
+
356
+ 0. Default values
357
+ 0. `HUTCH_*` environment variables
358
+ 0. Configuration file
359
+ 0. Explicit settings through `Hutch::Config.set`
360
+
361
+ ### Generated list of configuration options
362
+
363
+ Generate with
364
+
365
+ 0. `yard doc lib/hutch/config.rb`
366
+ 0. Copy the _Configuration_ section from `doc/Hutch/Config.html` here, with the anchor tags stripped.
367
+
368
+ <table border="1" class="settings" style="overflow:visible;">
369
+ <thead>
370
+ <tr>
371
+ <th>
372
+ Setting name
373
+ </th>
374
+ <th>
375
+ Default value
376
+ </th>
377
+ <th>
378
+ Type
379
+ </th>
380
+ <th>
381
+ ENV variable
382
+ </th>
383
+ <th>
384
+ Description
385
+ </th>
386
+ </tr>
387
+ </thead>
388
+ <tbody>
389
+ <tr>
390
+ <td><tt>mq_host</tt></td>
391
+ <td>127.0.0.1</td>
392
+ <td>String</td>
393
+ <td><tt>HUTCH_MQ_HOST</tt></td>
394
+ <td><p>RabbitMQ hostname</p></td>
395
+ </tr>
396
+ <tr>
397
+ <td><tt>mq_exchange</tt></td>
398
+ <td>hutch</td>
399
+ <td>String</td>
400
+ <td><tt>HUTCH_MQ_EXCHANGE</tt></td>
401
+ <td><p>RabbitMQ Exchange to use for publishing</p></td>
402
+ </tr>
403
+ <tr>
404
+ <td><tt>mq_vhost</tt></td>
405
+ <td>/</td>
406
+ <td>String</td>
407
+ <td><tt>HUTCH_MQ_VHOST</tt></td>
408
+ <td><p>RabbitMQ vhost to use</p></td>
409
+ </tr>
410
+ <tr>
411
+ <td><tt>mq_username</tt></td>
412
+ <td>guest</td>
413
+ <td>String</td>
414
+ <td><tt>HUTCH_MQ_USERNAME</tt></td>
415
+ <td><p>RabbitMQ username to use.</p></td>
416
+ </tr>
417
+ <tr>
418
+ <td><tt>mq_password</tt></td>
419
+ <td>guest</td>
420
+ <td>String</td>
421
+ <td><tt>HUTCH_MQ_PASSWORD</tt></td>
422
+ <td><p>RabbitMQ password</p></td>
423
+ </tr>
424
+ <tr>
425
+ <td><tt>uri</tt></td>
426
+ <td>nil</td>
427
+ <td>String</td>
428
+ <td><tt>HUTCH_URI</tt></td>
429
+ <td><p>RabbitMQ URI (takes precedence over MQ username, password, host, port and vhost settings)</p></td>
430
+ </tr>
431
+ <tr>
432
+ <td><tt>mq_api_host</tt></td>
433
+ <td>127.0.0.1</td>
434
+ <td>String</td>
435
+ <td><tt>HUTCH_MQ_API_HOST</tt></td>
436
+ <td><p>RabbitMQ HTTP API hostname</p></td>
437
+ </tr>
438
+ <tr>
439
+ <td><tt>mq_port</tt></td>
440
+ <td>5672</td>
441
+ <td>Number</td>
442
+ <td><tt>HUTCH_MQ_PORT</tt></td>
443
+ <td><p>RabbitMQ port</p></td>
444
+ </tr>
445
+ <tr>
446
+ <td><tt>mq_api_port</tt></td>
447
+ <td>15672</td>
448
+ <td>Number</td>
449
+ <td><tt>HUTCH_MQ_API_PORT</tt></td>
450
+ <td><p>RabbitMQ HTTP API port</p></td>
451
+ </tr>
452
+ <tr>
453
+ <td><tt>heartbeat</tt></td>
454
+ <td>30</td>
455
+ <td>Number</td>
456
+ <td><tt>HUTCH_HEARTBEAT</tt></td>
457
+ <td><p><a href="http://rabbitmq.com/heartbeats.html">RabbitMQ heartbeat timeout</a></p></td>
458
+ </tr>
459
+ <tr>
460
+ <td><tt>channel_prefetch</tt></td>
461
+ <td>0</td>
462
+ <td>Number</td>
463
+ <td><tt>HUTCH_CHANNEL_PREFETCH</tt></td>
464
+ <td><p>The <tt>basic.qos</tt> prefetch value to use.</p></td>
465
+ </tr>
466
+ <tr>
467
+ <td><tt>connection_timeout</tt></td>
468
+ <td>11</td>
469
+ <td>Number</td>
470
+ <td><tt>HUTCH_CONNECTION_TIMEOUT</tt></td>
471
+ <td><p>Bunny's socket open timeout</p></td>
472
+ </tr>
473
+ <tr>
474
+ <td><tt>read_timeout</tt></td>
475
+ <td>11</td>
476
+ <td>Number</td>
477
+ <td><tt>HUTCH_READ_TIMEOUT</tt></td>
478
+ <td><p>Bunny's socket read timeout</p></td>
479
+ </tr>
480
+ <tr>
481
+ <td><tt>write_timeout</tt></td>
482
+ <td>11</td>
483
+ <td>Number</td>
484
+ <td><tt>HUTCH_WRITE_TIMEOUT</tt></td>
485
+ <td><p>Bunny's socket write timeout</p></td>
486
+ </tr>
487
+ <tr>
488
+ <td><tt>graceful_exit_timeout</tt></td>
489
+ <td>11</td>
490
+ <td>Number</td>
491
+ <td><tt>HUTCH_GRACEFUL_EXIT_TIMEOUT</tt></td>
492
+ <td><p>FIXME: DOCUMENT THIS</p></td>
493
+ </tr>
494
+ <tr>
495
+ <td><tt>consumer_pool_size</tt></td>
496
+ <td>1</td>
497
+ <td>Number</td>
498
+ <td><tt>HUTCH_CONSUMER_POOL_SIZE</tt></td>
499
+ <td><p>Bunny consumer work pool size</p></td>
500
+ </tr>
501
+ <tr>
502
+ <td><tt>mq_tls</tt></td>
503
+ <td>false</td>
504
+ <td>Boolean</td>
505
+ <td><tt>HUTCH_MQ_TLS</tt></td>
506
+ <td><p>Should TLS be used?</p></td>
507
+ </tr>
508
+ <tr>
509
+ <td><tt>mq_verify_peer</tt></td>
510
+ <td>true</td>
511
+ <td>Boolean</td>
512
+ <td><tt>HUTCH_MQ_VERIFY_PEER</tt></td>
513
+ <td><p>Should SSL certificate be verified?</p></td>
514
+ </tr>
515
+ <tr>
516
+ <td><tt>mq_api_ssl</tt></td>
517
+ <td>false</td>
518
+ <td>Boolean</td>
519
+ <td><tt>HUTCH_MQ_API_SSL</tt></td>
520
+ <td><p>Should SSL be used for the RabbitMQ API?</p></td>
521
+ </tr>
522
+ <tr>
523
+ <td><tt>autoload_rails</tt></td>
524
+ <td>true</td>
525
+ <td>Boolean</td>
526
+ <td><tt>HUTCH_AUTOLOAD_RAILS</tt></td>
527
+ <td><p>Should the current Rails app directory be required?</p></td>
528
+ </tr>
529
+ <tr>
530
+ <td><tt>daemonise</tt></td>
531
+ <td>false</td>
532
+ <td>Boolean</td>
533
+ <td><tt>HUTCH_DAEMONISE</tt></td>
534
+ <td><p>Should the Hutch runner process daemonise?</p></td>
535
+ </tr>
536
+ <tr>
537
+ <td><tt>publisher_confirms</tt></td>
538
+ <td>false</td>
539
+ <td>Boolean</td>
540
+ <td><tt>HUTCH_PUBLISHER_CONFIRMS</tt></td>
541
+ <td><p>Should RabbitMQ publisher confirms be enabled?</p></td>
542
+ </tr>
543
+ <tr>
544
+ <td><tt>force_publisher_confirms</tt></td>
545
+ <td>false</td>
546
+ <td>Boolean</td>
547
+ <td><tt>HUTCH_FORCE_PUBLISHER_CONFIRMS</tt></td>
548
+ <td><p>Enables publisher confirms, forces Hutch::Broker#wait_for_confirms for</p></td>
549
+ </tr>
550
+ <tr>
551
+ <td><tt>enable_http_api_use</tt></td>
552
+ <td>true</td>
553
+ <td>Boolean</td>
554
+ <td><tt>HUTCH_ENABLE_HTTP_API_USE</tt></td>
555
+ <td><p>Should the RabbitMQ HTTP API be used?</p></td>
556
+ </tr>
557
+ <tr>
558
+ <td><tt>consumer_pool_abort_on_exception</tt></td>
559
+ <td>false</td>
560
+ <td>Boolean</td>
561
+ <td><tt>HUTCH_CONSUMER_POOL_ABORT_ON_EXCEPTION</tt></td>
562
+ <td><p>Should Bunny's consumer work pool threads abort on exception.</p></td>
563
+ </tr>
564
+ <tr>
565
+ <td><tt>consumer_tag_prefix</tt></td>
566
+ <td>hutch</td>
567
+ <td>String</td>
568
+ <td><tt>HUTCH_CONSUMER_TAG_PREFIX</tt></td>
569
+ <td><p>Prefix displayed on the consumers tags.</p></td>
570
+ </tr>
571
+ </tbody>
572
+ </table>
320
573
 
321
- ## Supported RabbitMQ Versions
322
-
323
- Hutch requires RabbitMQ 3.3 or later.
324
574
 
325
575
  ---
326
576