bunny 1.7.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +18 -0
- data/.gitignore +6 -1
- data/.rspec +1 -3
- data/.travis.yml +21 -14
- data/CONTRIBUTING.md +132 -0
- data/ChangeLog.md +745 -1
- data/Gemfile +13 -13
- data/LICENSE +1 -1
- data/README.md +41 -75
- data/Rakefile +54 -0
- data/bunny.gemspec +4 -10
- data/docker-compose.yml +28 -0
- data/docker/Dockerfile +24 -0
- data/docker/apt/preferences.d/erlang +3 -0
- data/docker/apt/sources.list.d/bintray.rabbitmq.list +2 -0
- data/docker/docker-entrypoint.sh +26 -0
- data/docker/rabbitmq.conf +29 -0
- data/examples/connection/automatic_recovery_with_basic_get.rb +1 -1
- data/examples/connection/automatic_recovery_with_client_named_queues.rb +1 -1
- data/examples/connection/automatic_recovery_with_multiple_consumers.rb +1 -1
- data/examples/connection/automatic_recovery_with_republishing.rb +1 -1
- data/examples/connection/automatic_recovery_with_server_named_queues.rb +1 -1
- data/examples/connection/channel_level_exception.rb +1 -9
- data/examples/connection/disabled_automatic_recovery.rb +1 -1
- data/examples/connection/heartbeat.rb +1 -1
- data/examples/consumers/high_and_low_priority.rb +1 -1
- data/examples/guides/extensions/alternate_exchange.rb +2 -0
- data/examples/guides/getting_started/hello_world.rb +2 -0
- data/examples/guides/getting_started/weathr.rb +2 -0
- data/examples/guides/queues/one_off_consumer.rb +2 -0
- data/examples/guides/queues/redeliveries.rb +2 -0
- data/lib/bunny.rb +6 -2
- data/lib/bunny/channel.rb +192 -109
- data/lib/bunny/channel_id_allocator.rb +6 -4
- data/lib/bunny/concurrent/continuation_queue.rb +34 -13
- data/lib/bunny/consumer_work_pool.rb +34 -6
- data/lib/bunny/cruby/socket.rb +29 -16
- data/lib/bunny/cruby/ssl_socket.rb +20 -7
- data/lib/bunny/exceptions.rb +7 -1
- data/lib/bunny/exchange.rb +11 -7
- data/lib/bunny/get_response.rb +1 -1
- data/lib/bunny/heartbeat_sender.rb +3 -2
- data/lib/bunny/jruby/socket.rb +23 -6
- data/lib/bunny/jruby/ssl_socket.rb +5 -0
- data/lib/bunny/queue.rb +12 -10
- data/lib/bunny/reader_loop.rb +31 -18
- data/lib/bunny/session.rb +389 -134
- data/lib/bunny/test_kit.rb +14 -0
- data/lib/bunny/timeout.rb +1 -12
- data/lib/bunny/transport.rb +114 -67
- data/lib/bunny/version.rb +1 -1
- data/repl +1 -1
- data/spec/config/rabbitmq.conf +13 -0
- data/spec/higher_level_api/integration/basic_ack_spec.rb +154 -22
- data/spec/higher_level_api/integration/basic_cancel_spec.rb +77 -11
- data/spec/higher_level_api/integration/basic_consume_spec.rb +60 -55
- data/spec/higher_level_api/integration/basic_consume_with_objects_spec.rb +6 -6
- data/spec/higher_level_api/integration/basic_get_spec.rb +31 -7
- data/spec/higher_level_api/integration/basic_nack_spec.rb +22 -19
- data/spec/higher_level_api/integration/basic_publish_spec.rb +11 -100
- data/spec/higher_level_api/integration/basic_qos_spec.rb +32 -4
- data/spec/higher_level_api/integration/basic_reject_spec.rb +94 -16
- data/spec/higher_level_api/integration/basic_return_spec.rb +4 -4
- data/spec/higher_level_api/integration/channel_close_spec.rb +51 -10
- data/spec/higher_level_api/integration/channel_open_spec.rb +12 -12
- data/spec/higher_level_api/integration/connection_recovery_spec.rb +412 -286
- data/spec/higher_level_api/integration/connection_spec.rb +284 -134
- data/spec/higher_level_api/integration/connection_stop_spec.rb +31 -19
- data/spec/higher_level_api/integration/consumer_cancellation_notification_spec.rb +17 -17
- data/spec/higher_level_api/integration/dead_lettering_spec.rb +14 -14
- data/spec/higher_level_api/integration/exchange_bind_spec.rb +5 -5
- data/spec/higher_level_api/integration/exchange_declare_spec.rb +32 -31
- data/spec/higher_level_api/integration/exchange_delete_spec.rb +12 -12
- data/spec/higher_level_api/integration/exchange_unbind_spec.rb +5 -5
- data/spec/higher_level_api/integration/exclusive_queue_spec.rb +5 -5
- data/spec/higher_level_api/integration/heartbeat_spec.rb +4 -4
- data/spec/higher_level_api/integration/message_properties_access_spec.rb +49 -49
- data/spec/higher_level_api/integration/predeclared_exchanges_spec.rb +2 -2
- data/spec/higher_level_api/integration/publisher_confirms_spec.rb +92 -27
- data/spec/higher_level_api/integration/publishing_edge_cases_spec.rb +19 -19
- data/spec/higher_level_api/integration/queue_bind_spec.rb +23 -23
- data/spec/higher_level_api/integration/queue_declare_spec.rb +129 -34
- data/spec/higher_level_api/integration/queue_delete_spec.rb +2 -2
- data/spec/higher_level_api/integration/queue_purge_spec.rb +5 -5
- data/spec/higher_level_api/integration/queue_unbind_spec.rb +6 -6
- data/spec/higher_level_api/integration/read_only_consumer_spec.rb +9 -9
- data/spec/higher_level_api/integration/sender_selected_distribution_spec.rb +10 -10
- data/spec/higher_level_api/integration/tls_connection_spec.rb +218 -112
- data/spec/higher_level_api/integration/toxiproxy_spec.rb +76 -0
- data/spec/higher_level_api/integration/tx_commit_spec.rb +1 -1
- data/spec/higher_level_api/integration/tx_rollback_spec.rb +1 -1
- data/spec/higher_level_api/integration/with_channel_spec.rb +2 -2
- data/spec/issues/issue100_spec.rb +11 -12
- data/spec/issues/issue141_spec.rb +13 -14
- data/spec/issues/issue202_spec.rb +1 -1
- data/spec/issues/issue224_spec.rb +5 -5
- data/spec/issues/issue465_spec.rb +32 -0
- data/spec/issues/issue549_spec.rb +30 -0
- data/spec/issues/issue78_spec.rb +21 -24
- data/spec/issues/issue83_spec.rb +5 -6
- data/spec/issues/issue97_spec.rb +44 -45
- data/spec/lower_level_api/integration/basic_cancel_spec.rb +15 -16
- data/spec/lower_level_api/integration/basic_consume_spec.rb +20 -21
- data/spec/spec_helper.rb +2 -19
- data/spec/stress/channel_close_stress_spec.rb +3 -3
- data/spec/stress/channel_open_stress_spec.rb +4 -4
- data/spec/stress/channel_open_stress_with_single_threaded_connection_spec.rb +7 -7
- data/spec/stress/concurrent_consumers_stress_spec.rb +18 -16
- data/spec/stress/concurrent_publishers_stress_spec.rb +16 -19
- data/spec/stress/connection_open_close_spec.rb +9 -9
- data/spec/stress/merry_go_round_spec.rb +105 -0
- data/spec/tls/ca_certificate.pem +27 -16
- data/spec/tls/ca_key.pem +52 -27
- data/spec/tls/client_certificate.pem +27 -16
- data/spec/tls/client_key.pem +49 -25
- data/spec/tls/generate-server-cert.sh +8 -0
- data/spec/tls/server-openssl.cnf +10 -0
- data/spec/tls/server.csr +16 -0
- data/spec/tls/server_certificate.pem +27 -16
- data/spec/tls/server_key.pem +49 -25
- data/spec/toxiproxy_helper.rb +28 -0
- data/spec/unit/bunny_spec.rb +5 -5
- data/spec/unit/concurrent/atomic_fixnum_spec.rb +6 -6
- data/spec/unit/concurrent/condition_spec.rb +8 -8
- data/spec/unit/concurrent/linked_continuation_queue_spec.rb +2 -2
- data/spec/unit/concurrent/synchronized_sorted_set_spec.rb +16 -16
- data/spec/unit/exchange_recovery_spec.rb +39 -0
- data/spec/unit/version_delivery_tag_spec.rb +3 -3
- metadata +42 -35
- data/lib/bunny/system_timer.rb +0 -20
- data/spec/config/rabbitmq.config +0 -18
- data/spec/higher_level_api/integration/basic_recover_spec.rb +0 -18
- data/spec/higher_level_api/integration/confirm_select_spec.rb +0 -19
- data/spec/higher_level_api/integration/consistent_hash_exchange_spec.rb +0 -50
- data/spec/higher_level_api/integration/merry_go_round_spec.rb +0 -85
- data/spec/stress/long_running_consumer_spec.rb +0 -83
- data/spec/tls/cacert.pem +0 -18
- data/spec/tls/client_cert.pem +0 -18
- data/spec/tls/server_cert.pem +0 -18
- data/spec/unit/system_timer_spec.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f3ba4a5565a42eace00f8789c1be953871d9dc57d42028a94a9dd70a586271e
|
4
|
+
data.tar.gz: c7d2fdf832b466a27c7ae884e6195729d31a6bf1cb6accde9818c2f72b46cdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26a352492ca652429975e45ec36fad12ebfd3c94e66babb879afb0f09dcec0158affc820f8a29fd07a25d8db6ac9312fd31ebc5b1a3d4c315ecfeeb880a5a8f2
|
7
|
+
data.tar.gz: 393fa99fb87c7784eccd0f5019fe3668b39064e15935d85f4134c85aa6b138849d0026addb814f49d00f606b9157b78878863c875d2ad6480b17b3053dcb98fb
|
@@ -0,0 +1,18 @@
|
|
1
|
+
## Does This Really Belong to GitHub issues?
|
2
|
+
|
3
|
+
If you find a bug you understand well, poor default, incorrect or unclear piece of documentation,
|
4
|
+
or missing feature, please [file an
|
5
|
+
issue](http://github.com/ruby-amqp/bunny/issues) on GitHub.
|
6
|
+
|
7
|
+
Please use [Bunny's mailing list](http://groups.google.com/group/ruby-amqp) for questions,
|
8
|
+
investigations, and discussions. GitHub issues should be used for specific, well understood, actionable
|
9
|
+
maintainers and contributors can work on.
|
10
|
+
|
11
|
+
When filing an issue, please specify
|
12
|
+
|
13
|
+
* Which Bunny and RabbitMQ versions are used
|
14
|
+
* Recent RabbitMQ log file contents
|
15
|
+
* Full exception stack traces
|
16
|
+
* Steps to reproduce or a failing test case
|
17
|
+
|
18
|
+
This would greatly help the maintainers help you.
|
data/.gitignore
CHANGED
@@ -11,7 +11,7 @@ Gemfile.lock
|
|
11
11
|
.tags
|
12
12
|
.tags_sorted_by_file
|
13
13
|
.Apple*
|
14
|
-
bin/*
|
14
|
+
/bin/*
|
15
15
|
.bundle/*
|
16
16
|
vendor/*
|
17
17
|
playground/*
|
@@ -21,3 +21,8 @@ debug/*
|
|
21
21
|
*.dump
|
22
22
|
deploy.docs.sh
|
23
23
|
.ruby-version
|
24
|
+
.idea
|
25
|
+
*.srl
|
26
|
+
spec/tls/*.pem
|
27
|
+
spec/tls/*.pem~
|
28
|
+
spec/tls/*.p12
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
@@ -1,15 +1,21 @@
|
|
1
|
+
dist: bionic
|
1
2
|
language: ruby
|
2
3
|
bundler_args: --without development
|
3
|
-
|
4
|
-
|
4
|
+
cache: bundler
|
5
|
+
before_install:
|
6
|
+
- gem install bundler
|
7
|
+
before_script:
|
8
|
+
- "./bin/ci/install_on_debian.sh"
|
9
|
+
- until sudo lsof -i:5672; do echo "Waiting for RabbitMQ to start..."; sleep 1; done
|
10
|
+
- "./bin/ci/before_build.sh"
|
11
|
+
script: "bundle exec rake integration_without_recovery"
|
5
12
|
rvm:
|
6
|
-
-
|
7
|
-
- "2.
|
8
|
-
- "
|
9
|
-
- "
|
10
|
-
- "
|
11
|
-
- "
|
12
|
-
- "1.8.7"
|
13
|
+
- ruby-head
|
14
|
+
- "2.7.1"
|
15
|
+
- "2.6.6"
|
16
|
+
- "2.5.8"
|
17
|
+
- "2.4.10"
|
18
|
+
- "2.3.8"
|
13
19
|
notifications:
|
14
20
|
email: michael@rabbitmq.com
|
15
21
|
services:
|
@@ -17,10 +23,11 @@ services:
|
|
17
23
|
branches:
|
18
24
|
only:
|
19
25
|
- master
|
20
|
-
-
|
26
|
+
- 2.14.x-stable
|
27
|
+
- 2.13.x-stable
|
28
|
+
env:
|
29
|
+
- CI=true
|
21
30
|
matrix:
|
22
31
|
allow_failures:
|
23
|
-
|
24
|
-
|
25
|
-
- rvm: "1.8.7"
|
26
|
-
- rvm: jruby
|
32
|
+
rvm:
|
33
|
+
- ruby-head
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
## Overview
|
2
|
+
|
3
|
+
This project **does not** use GitHub issues for questions, investigations, discussions, and so on.
|
4
|
+
Issues are appropriate for something specific enough for a maintainer or contributor to work on:
|
5
|
+
|
6
|
+
* There should be enough information to reproduce the behavior observed in a reasonable amount of time
|
7
|
+
* It should be reasonably clear why the behavior should be changed and why this cannot or should not be addressed
|
8
|
+
in application code, a separate library and so on
|
9
|
+
|
10
|
+
All issues that do not satisfy the above properties belong to the [Ruby RabbitMQ clients mailing list](http://groups.google.com/forum/#!forum/ruby-amqp). Pull request that do not satisfy them have a high chance
|
11
|
+
of being closed.
|
12
|
+
|
13
|
+
## Submitting a Pull Request
|
14
|
+
|
15
|
+
Please read the sections below to get an idea about how to run Bunny test suites first. Successfully
|
16
|
+
running all tests, at least with `CI` environment variable exported to `true`, is an important
|
17
|
+
first step for any contributor.
|
18
|
+
|
19
|
+
Once you have a passing test suite, create a branch and make your changes on it.
|
20
|
+
When you are done with your changes and all
|
21
|
+
tests pass, write a [good, detailed commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) submit a pull request on GitHub.
|
22
|
+
|
23
|
+
## Pre-requisites
|
24
|
+
|
25
|
+
The project uses Bundler for dependency management and requires RabbitMQ `3.5+` to be running
|
26
|
+
locally with the `rabbitmq-management` and `rabbitmq_consistent_hash_exchange` plugins enabled.
|
27
|
+
|
28
|
+
### Running the Specs
|
29
|
+
|
30
|
+
The specs require RabbitMQ to be running locally with a specific set of virtual hosts
|
31
|
+
and users. RabbitMQ can be provisioned and started any way that's convenient to you
|
32
|
+
as long as it has a suitable TLS keys configuration and management plugin enabled.
|
33
|
+
Make sure you have a recent version of RabbitMQ (> `3.7.10`).
|
34
|
+
|
35
|
+
The test suite can either use a locally available RabbitMQ node ([generic binary builds](http://www.rabbitmq.com/install-generic-unix.html)
|
36
|
+
are an option that works well) or by running a RabbitMQ server in a Docker container.
|
37
|
+
|
38
|
+
### Using a locally installed RabbitMQ node
|
39
|
+
|
40
|
+
It is possible to start a local RabbitMQ node from the repository root. It is not necessarily
|
41
|
+
optimal but can be a good starting point but is a useful example:
|
42
|
+
|
43
|
+
```
|
44
|
+
RABBITMQ_NODENAME=bunny RABBITMQ_CONFIG_FILE=./spec/config/rabbitmq.conf RABBITMQ_ENABLED_PLUGINS_FILE=./spec/config/enabled_plugins rabbitmq-server
|
45
|
+
```
|
46
|
+
|
47
|
+
The specs need the RabbitMQ management plugin to be enabled and include TLS connectivity tests,
|
48
|
+
so the node must be configured to use a [certificate and key pair](http://www.rabbitmq.com/ssl.html#certificates-and-keys).
|
49
|
+
The config and enabled plugin files in the spec/config directory take care of that
|
50
|
+
but certificates must be provisioned locally. By default there's a set of CA, server, and client certificates pre-generated at `spec/tls`.
|
51
|
+
|
52
|
+
The `BUNNY_CERTIFICATE_DIR` environment variable can be used to a directory containing a CA certificate
|
53
|
+
and a certificate/key pair to be used by the server. The directory can be generated using
|
54
|
+
[tls-gen](https://github.com/michaelklishin/tls-gen)'s basic profile. This option is recommended.
|
55
|
+
|
56
|
+
`BUNNY_RABBITMQ_HOSTNAME` can be used to override the expected server hostname for [peer verification](http://www.rabbitmq.com/ssl.html#peer-verification) in the TLS test suite:
|
57
|
+
|
58
|
+
```
|
59
|
+
BUNNY_CERTIFICATE_DIR="/path/to/tls-gen/basic/result" BUNNY_RABBITMQ_HOSTNAME="mayflower" bundle exec rspec
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
Certificates can be generated with [tls-gen](https://github.com/michaelklishin/tls-gen)'s basic profile.
|
64
|
+
In that case they include a Subject Alternative Name of `localhost` for improved portability.
|
65
|
+
|
66
|
+
|
67
|
+
### Node Setup
|
68
|
+
|
69
|
+
There is also a script that preconfigured the node for Bunny tests. It is sufficient to run
|
70
|
+
it once but if RabbitMQ is reset it has to be executed again:
|
71
|
+
|
72
|
+
```
|
73
|
+
RABBITMQ_NODENAME=bunny ./bin/ci/before_build
|
74
|
+
```
|
75
|
+
|
76
|
+
The script uses `rabbitmqctl` and `rabbitmq-plugins`
|
77
|
+
to set up RabbitMQ in a way that Bunny test suites expect. Two environment variables,
|
78
|
+
`RABBITMQCTL` and `RABBITMQ_PLUGINS`, are available to control what `rabbitmqctl` and
|
79
|
+
`rabbitmq-plugins` commands will be used. By default they are taken from `PATH`
|
80
|
+
and prefixed with `sudo`.
|
81
|
+
|
82
|
+
And then run the core integration suite:
|
83
|
+
|
84
|
+
```
|
85
|
+
RABBITMQ_NODENAME=bunny CI=true rspec
|
86
|
+
```
|
87
|
+
|
88
|
+
#### Running a RabbitMQ server in a Docker container
|
89
|
+
|
90
|
+
First off you have to [install Docker Compose](https://docker.github.io/compose/install/) (and by proxy Docker).
|
91
|
+
Version >= 1.6.0+ is required for compose version 2 syntax.
|
92
|
+
|
93
|
+
After those have been installed (and the `docker-compose` command is available on your command line path), run
|
94
|
+
|
95
|
+
```
|
96
|
+
docker-compose build && docker-compose run --service-ports rabbitmq
|
97
|
+
```
|
98
|
+
|
99
|
+
The first time you do this, it will take some time, since it has to download everything it needs
|
100
|
+
to build the Docker image.
|
101
|
+
|
102
|
+
The RabbitMQ server will run in the foreground in the terminal where you started it. You can stop
|
103
|
+
it by pressing CTRL+C. If you want to run it in the background, pass `-d` to `docker-compose`.
|
104
|
+
|
105
|
+
### Toxiproxy
|
106
|
+
|
107
|
+
If Toxiproxy is running locally on standard ports or started via Docker:
|
108
|
+
|
109
|
+
```
|
110
|
+
docker-compose run --service-ports toxiproxy
|
111
|
+
```
|
112
|
+
|
113
|
+
then Bunny will run additional resiliency tests.
|
114
|
+
|
115
|
+
### Running Test Suites
|
116
|
+
|
117
|
+
Prior to running the tests, configure the RabbitMQ permissions by running `./bin/ci/before_build`
|
118
|
+
if you have RabbitMQ locally installed, if you are running RabbitMQ via Docker as above this step
|
119
|
+
is not required as the setup is baked in.
|
120
|
+
|
121
|
+
Make sure you have those two installed and then run integration tests:
|
122
|
+
|
123
|
+
bundle install
|
124
|
+
rake integration
|
125
|
+
|
126
|
+
It is possible to run all tests:
|
127
|
+
|
128
|
+
bundle exec rspec
|
129
|
+
|
130
|
+
It is possible to run only integration and regression tests but exclude unit and stress tests:
|
131
|
+
|
132
|
+
CI=true bundle exec rspec spec/higher_level_api/ spec/lower_level_api spec/issues spec/higher_level_api/integration/connection_recovery_spec.rb
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,740 @@
|
|
1
|
+
## Changes between Bunny 2.17.x and 2.18.0 (in development)
|
2
|
+
|
3
|
+
No changes yet.
|
4
|
+
|
5
|
+
|
6
|
+
## Changes between Bunny 2.16.x and 2.17.0 (Sep 11th, 2020)
|
7
|
+
|
8
|
+
### Easier to Specify a Client-Propvided Connection Name
|
9
|
+
|
10
|
+
It is now easier to provide a client-provided (custom) connection
|
11
|
+
name that will be displayed in the RabbitMQ management UI and mentioned in
|
12
|
+
[server logs](https://www.rabbitmq.com/logging.html).
|
13
|
+
|
14
|
+
Instead of
|
15
|
+
|
16
|
+
``` ruby
|
17
|
+
conn = Bunny.new(client_properties: {connection_name: 'app ABC #{rand}'})
|
18
|
+
conn.start
|
19
|
+
```
|
20
|
+
|
21
|
+
a new top-level connection option now can be used:
|
22
|
+
|
23
|
+
``` ruby
|
24
|
+
conn = Bunny.new(connection_name: 'app ABC #{rand}')
|
25
|
+
conn.start
|
26
|
+
```
|
27
|
+
|
28
|
+
Contributed by @brerx.
|
29
|
+
|
30
|
+
GitHub issue: [ruby-amqp/bunny#600](https://github.com/ruby-amqp/bunny/pull/600)
|
31
|
+
|
32
|
+
|
33
|
+
## Changes between Bunny 2.15.0 and 2.16.0 (Aug 14th, 2020)
|
34
|
+
|
35
|
+
### Asynchronous Exception Delegate
|
36
|
+
|
37
|
+
Bunny now can delete asynchronous connection (`Bunny::Session`) exception to an arbitrary
|
38
|
+
delegate object. Use the `:session_error_handler` connection setting to pass it.
|
39
|
+
The value defaults to `Thread.current`.
|
40
|
+
|
41
|
+
Contributed by @bbascarevic.
|
42
|
+
|
43
|
+
GitHub issue: [ruby-amqp/bunny#597](https://github.com/ruby-amqp/bunny/issues/597)
|
44
|
+
|
45
|
+
|
46
|
+
## Changes between Bunny 2.14.0 and 2.15.0 (Apr 8th, 2020)
|
47
|
+
|
48
|
+
### More Defensive Thread Join Operations
|
49
|
+
|
50
|
+
Bunny is now more defensive around thread join operations which it performs
|
51
|
+
when stopping its consumer work pool.
|
52
|
+
|
53
|
+
`Thread#join` can cause an unhandled exception to be re-raised at
|
54
|
+
a very surprising moment. This behavior can also be affected by 3rd party
|
55
|
+
libraries, e.g. those that do connection pooling. While Bunny cannot
|
56
|
+
fully avoid every possible surprising failure, it now avoids at least
|
57
|
+
one such problematic interaction triggered by a custom [interrupt handler](https://ruby-doc.org/core-2.5.1/Thread.html#method-c-handle_interrupt)
|
58
|
+
in a 3rd party library.
|
59
|
+
|
60
|
+
GitHub issue: [#589](https://github.com/ruby-amqp/bunny/issues/589)
|
61
|
+
|
62
|
+
Contributed by @fuegas.
|
63
|
+
|
64
|
+
### Dependency Updates
|
65
|
+
|
66
|
+
`amq-protocol` dependency has been bumped to `2.3.1` to support `connection.update-secret`
|
67
|
+
protocol extension.
|
68
|
+
|
69
|
+
### Gem Installation Fixed on Windows
|
70
|
+
|
71
|
+
`bin/ci`, a directory with symlinks, is no longer included into the gem.
|
72
|
+
|
73
|
+
Contributed by Jack Xiaosong Xu.
|
74
|
+
|
75
|
+
### Lazy Peer Certificate Chain Information Logging
|
76
|
+
|
77
|
+
Peer certificate chain information is now logged lazily, which prevents
|
78
|
+
an obscure exception originating ASN.1 parser and makes the logging
|
79
|
+
code evaluate only when it is really necessary.
|
80
|
+
|
81
|
+
GitHub issue: [#578](https://github.com/ruby-amqp/bunny/pull/578)
|
82
|
+
|
83
|
+
Contributed by Garrett Thornburg.
|
84
|
+
|
85
|
+
|
86
|
+
## Changes between Bunny 2.13.0 and 2.14.0 (Feb 20th, 2019)
|
87
|
+
|
88
|
+
### Improved Peer Verification Failure Logging
|
89
|
+
|
90
|
+
When [peer verification](https://www.rabbitmq.com/ssl.html#peer-verification) fails, the connection will now log
|
91
|
+
some relevant peer certificate chain details. If Bunny
|
92
|
+
log level is set to `debug`, the same information will be logged
|
93
|
+
unconditionally.
|
94
|
+
|
95
|
+
### Closing Connections without Waiting for Response
|
96
|
+
|
97
|
+
`Bunny::Session#close` now accepts a parameter that controls whether
|
98
|
+
it waits for a `connection.close-ok` frame. Not waiting is useful
|
99
|
+
when it is known for a fact that the node might not respond
|
100
|
+
(it might be shutting down, connection is known to be interrupted
|
101
|
+
or unrecoverable and so on) or waiting is irrelevant to the caller.
|
102
|
+
|
103
|
+
### Successful Connection Recovery Notification
|
104
|
+
|
105
|
+
`Bunny::Session#after_recovery_completed` (accepts a block)
|
106
|
+
and a new connection option, `:recovery_completed` (a callable object)
|
107
|
+
can be used to react to successful connection and topology recovery.
|
108
|
+
|
109
|
+
GitHub issue: [#573](https://github.com/ruby-amqp/bunny/pull/573).
|
110
|
+
|
111
|
+
Contributed by Ionut Popa.
|
112
|
+
|
113
|
+
### effin_utf8 Dependency Dropped
|
114
|
+
|
115
|
+
This library no longer supports Ruby 1.8 and thus
|
116
|
+
doesn't need to depend on the `effin_utf8` gem.
|
117
|
+
|
118
|
+
Contributed by Luciano Sousa.
|
119
|
+
|
120
|
+
|
121
|
+
## Changes between Bunny 2.12.0 and 2.13.0 (Dec 25th, 2018)
|
122
|
+
|
123
|
+
### More Defensive `Bunny::Channel` Method(s)
|
124
|
+
|
125
|
+
`Bunny::Channel#queue` will now throw an `ArgumentError` if a `nil`
|
126
|
+
is passed for queue name.
|
127
|
+
|
128
|
+
GitHub issue: [#570](https://github.com/ruby-amqp/bunny/issues/570)
|
129
|
+
|
130
|
+
### Correct Logging of Recovery Attempts Left
|
131
|
+
|
132
|
+
During connection recovery, if `recover_attempts` is not set (is `nil`)
|
133
|
+
connection could produce confusing log messages.
|
134
|
+
|
135
|
+
GitHub issue: [#569](https://github.com/ruby-amqp/bunny/issues/569)
|
136
|
+
|
137
|
+
|
138
|
+
## Changes between Bunny 2.11.0 and 2.12.0 (Sep 22nd, 2018)
|
139
|
+
|
140
|
+
### More Defensive Treatment of `queue.declare-ok` Responses
|
141
|
+
|
142
|
+
Responses for `queue.declare` are now checked against a memoized
|
143
|
+
queue name (but only if the queue is not server-named). This helps
|
144
|
+
avoids scenarios with overlapping/concurrent requests due to high
|
145
|
+
network latency as demonstrated in [#558](https://github.com/ruby-amqp/bunny/issues/558).
|
146
|
+
|
147
|
+
"Mismatched" responses will be ignored: Bunny channel API would throw
|
148
|
+
an exception for such declarations and there would be no way to "return to"
|
149
|
+
even if a matching response arrived and was matched with one of the pending
|
150
|
+
requests in a reasonable period of time.
|
151
|
+
|
152
|
+
As part of this work a new Toxiproxy-based test suite was introduced
|
153
|
+
to Bunny.
|
154
|
+
|
155
|
+
GitHub issue: [#558](https://github.com/ruby-amqp/bunny/issues/558)
|
156
|
+
|
157
|
+
Reproduction steps contributed by Brian Morton and Scott Bonebraker.
|
158
|
+
|
159
|
+
### I/O Exceptions from Heartbeat Sender are Now Silent
|
160
|
+
|
161
|
+
Heartbeat sender's purpose is to notify the peer, not so much
|
162
|
+
to detect local connectivity failures; those will be detected
|
163
|
+
by the I/O loop and transport.
|
164
|
+
|
165
|
+
For single threaded connection users that prefer to roll their own
|
166
|
+
recovery strategies getting exceptions from the heartbeat sender
|
167
|
+
was counterproductive and painful to deal with.
|
168
|
+
|
169
|
+
As part of this work a new Toxiproxy-based test suite was introduced
|
170
|
+
to Bunny.
|
171
|
+
|
172
|
+
GitHub issue: [#559](https://github.com/ruby-amqp/bunny/issues/559)
|
173
|
+
|
174
|
+
Contributed by Scott Bonebraker.
|
175
|
+
|
176
|
+
### Correct Connection State on Connections that Experienced Missed Heartbeat
|
177
|
+
|
178
|
+
Connections that experienced connection closure did not always correctly transition to the closed state.
|
179
|
+
`Bunny::ConnectionClosedError` will now be thrown when an operation is attempted on such
|
180
|
+
connections.
|
181
|
+
|
182
|
+
GitHub issue: [#561](https://github.com/ruby-amqp/bunny/issues/561)
|
183
|
+
|
184
|
+
Contributed by Scott Bonebraker.
|
185
|
+
|
186
|
+
### Connection Recovery Will Fail When Max Retry Attempt Limit is Exceeded
|
187
|
+
|
188
|
+
GitHub issue: [#549](https://github.com/ruby-amqp/bunny/issues/549)
|
189
|
+
|
190
|
+
Contributed by Arlandis Word.
|
191
|
+
|
192
|
+
### Squashed Warnings
|
193
|
+
|
194
|
+
Many warnings have been eliminated.
|
195
|
+
|
196
|
+
GitHub issue: [#563](https://github.com/ruby-amqp/bunny/issues/563)
|
197
|
+
|
198
|
+
Contributed by @dacto.
|
199
|
+
|
200
|
+
|
201
|
+
### API Reference Corrections
|
202
|
+
|
203
|
+
GitHub issue: [#557](https://github.com/ruby-amqp/bunny/pull/557)
|
204
|
+
|
205
|
+
Contributed by Bruno Costa.
|
206
|
+
|
207
|
+
|
208
|
+
## Changes between Bunny 2.10.0 and 2.11.0 (Jun 21st, 2018)
|
209
|
+
|
210
|
+
### More Reliable System-wide Trusted Certificate Directory Detection
|
211
|
+
|
212
|
+
Bunny no longer tries to compile a list of trusted CA certificates on its own.
|
213
|
+
Instead it uses an OpenSSL API method that makes OpenSSL set the path(s),
|
214
|
+
which should cover more platforms and be forward- and backward-compatible.
|
215
|
+
|
216
|
+
GitHub issue: [#555](https://github.com/ruby-amqp/bunny/issues/555).
|
217
|
+
|
218
|
+
Contributed by Ana María Martínez Gómez.
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
## Changes between Bunny 2.9.0 and 2.10.0 (Jun 5th, 2018)
|
223
|
+
|
224
|
+
`2.10.0` is a maintenance release that introduces a couple of
|
225
|
+
**minor potentially breaking changes**.
|
226
|
+
|
227
|
+
|
228
|
+
### Disabling Heartbeats Also Disables TCP Socket Read Timeouts
|
229
|
+
|
230
|
+
Disabling heartbeats will now disable TCP socket read timeouts.
|
231
|
+
|
232
|
+
They go hand in hand and users who prefer TCP keepalives via
|
233
|
+
kernel configuration previously had to also explicitly configure
|
234
|
+
a zero read timeout.
|
235
|
+
|
236
|
+
GitHub issue: [#551](https://github.com/ruby-amqp/bunny/pull/551).
|
237
|
+
|
238
|
+
Contributed by Carl Hörberg.
|
239
|
+
|
240
|
+
|
241
|
+
### `verify_peer: false` Has the Expected Effect Again
|
242
|
+
|
243
|
+
Make sure `verify_peer: false` has the expected effect again.
|
244
|
+
|
245
|
+
Default value of connection's `:verify_peer` option to `true` only when
|
246
|
+
all of `:verify_ssl`, `:verify_peer`, and `:verify` are `nil`.
|
247
|
+
|
248
|
+
GitHub issue: [#541](https://github.com/ruby-amqp/bunny/issues/541).
|
249
|
+
|
250
|
+
Contributed by Howard Ding.
|
251
|
+
|
252
|
+
|
253
|
+
### Maximum Number of Channels Limited to 2K by Default
|
254
|
+
|
255
|
+
Default maximum number of channels is limited to 2047 to reduce the probability
|
256
|
+
of severe channel leaks. See [rabbitmq/rabbitmq-server#1593](https://github.com/rabbitmq/rabbitmq-server/issues/1593) for details.
|
257
|
+
|
258
|
+
Applications that want to use more channels per connection can still configure a higher value
|
259
|
+
using the `channel_max` setting (for both Bunny and RabbitMQ server).
|
260
|
+
|
261
|
+
GitHub issue: [#553](https://github.com/ruby-amqp/bunny/pull/553).
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
### Squashed Some Warnings
|
266
|
+
|
267
|
+
GitHub issue: [#552](https://github.com/ruby-amqp/bunny/pull/552).
|
268
|
+
|
269
|
+
Contributed by @utilum.
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
### Disabling Heartbeats Disables TCP Socket Read Timeouts
|
274
|
+
|
275
|
+
Disabling heartbeats will also disable TCP socket read timeouts,
|
276
|
+
since the two are effectively interconnected. In this case a mechanism
|
277
|
+
such as [TCP keepalives](http://www.rabbitmq.com/heartbeats.html#tcp-keepalives) is assumed to be used.
|
278
|
+
|
279
|
+
See [RabbitMQ heartbeats guide](http://www.rabbitmq.com/heartbeats.html) for a more
|
280
|
+
detailed overview of the options.
|
281
|
+
|
282
|
+
GH issue: [#519](https://github.com/ruby-amqp/bunny/issues/519).
|
283
|
+
|
284
|
+
Contributed by Carl Hörberg.
|
285
|
+
|
286
|
+
|
287
|
+
## Changes between Bunny 2.8.0 and 2.9.0 (Jan 8th, 2018)
|
288
|
+
|
289
|
+
### Ruby 2.2 Requirement
|
290
|
+
|
291
|
+
Bunny now requires Ruby 2.2.
|
292
|
+
|
293
|
+
|
294
|
+
### Connection Recovery Now Retries on Timeouts
|
295
|
+
|
296
|
+
Connection recovery now will retry on TCP connection timeouts.
|
297
|
+
|
298
|
+
GitHub issue: [#537](https://github.com/ruby-amqp/bunny/pull/537).
|
299
|
+
|
300
|
+
|
301
|
+
### More URI Query Parameters
|
302
|
+
|
303
|
+
Bunny now supports more URI query parameters plus aliases
|
304
|
+
that are identical to those of the server.
|
305
|
+
|
306
|
+
Contributed by Andrew Babichev.
|
307
|
+
|
308
|
+
GitHub issue: [#534](https://github.com/ruby-amqp/bunny/pull/534)
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
## Changes between Bunny 2.7.0 and 2.8.0 (Dec 18th, 2018)
|
313
|
+
|
314
|
+
This release has **minor breaking public API changes**.
|
315
|
+
|
316
|
+
### `Bunny::Channel#close` on a Closed Channel Now Raises a Sensible Exception
|
317
|
+
|
318
|
+
`Bunny::Channel#close` on an already closed channel will now raise a sensible exception.
|
319
|
+
If the channel was closed due to a channel-level protocol exception, that exception will
|
320
|
+
be mentioned.
|
321
|
+
|
322
|
+
GitHub issue: [#528](https://github.com/ruby-amqp/bunny/issues/528), see [9df7cb](https://github.com/ruby-amqp/bunny/commit/9df7cb04d9ff12b1af62a11e239fd81e5472c872) for
|
323
|
+
details.
|
324
|
+
|
325
|
+
### JRuby 9K Compatibility
|
326
|
+
|
327
|
+
A JRuby 9K compatibility issue was corrected by Marian Posăceanu.
|
328
|
+
Note that JRuby users are recommended to use [March Hare](http://rubymarchhare.info/), a JRuby-oriented client, instead
|
329
|
+
of Bunny.
|
330
|
+
|
331
|
+
GitHub issue: [#529](https://github.com/ruby-amqp/bunny/pull/529)
|
332
|
+
|
333
|
+
### Connection Exceptions are Logged as Warning with Automatic Recovery
|
334
|
+
|
335
|
+
When automatic recovery is enabled, connection errors are now logged as warnings
|
336
|
+
and not errors.
|
337
|
+
|
338
|
+
Contributed by Merten Falk.
|
339
|
+
|
340
|
+
GitHub issue: [#531](https://github.com/ruby-amqp/bunny/pull/531)
|
341
|
+
|
342
|
+
### Server Heartbeat Value as a String
|
343
|
+
|
344
|
+
It is now possible to specify a server-defined heartbeat value as a string (`"server"`), not just
|
345
|
+
a symbol. This makes it easier to load settings from YAML files.
|
346
|
+
|
347
|
+
Contributed by Tyrone Wilson.
|
348
|
+
|
349
|
+
GitHub issue: [#524](https://github.com/ruby-amqp/bunny/pull/524)
|
350
|
+
|
351
|
+
|
352
|
+
## Changes between Bunny 2.7.0 and 2.7.1 (Sep 25th, 2017)
|
353
|
+
|
354
|
+
### Sensible Socket Read Timeouts When RabbitMQ is Configured to Disabled Heartbeats
|
355
|
+
|
356
|
+
Bunny now correctly handles scenarios where server is configured
|
357
|
+
to disable heartbeats (which is a terrible idea, don't do it!)
|
358
|
+
|
359
|
+
GitHub issue: [#519](https://github.com/ruby-amqp/bunny/issues/519).
|
360
|
+
|
361
|
+
### Bunny::Channel#basic_get Usability
|
362
|
+
|
363
|
+
`Bunny::Channel#basic_get` invoked with a non-existent queue now
|
364
|
+
throws a channel exception instead of a generic operation timeout.
|
365
|
+
|
366
|
+
GitHub issue: [#518](https://github.com/ruby-amqp/bunny/issues/518).
|
367
|
+
|
368
|
+
### Spec Suite Improvements
|
369
|
+
|
370
|
+
`BUNNY_CERTIFICATE_DIR` environment variable now can be used
|
371
|
+
to override local CA and client certificate/key pair directory.
|
372
|
+
The directory is expected to be the result directory generated
|
373
|
+
by the basic [tls-gen](http://github.com/michaelklishin/tls-gen) profile.
|
374
|
+
|
375
|
+
TLSv1.0 is no longer used in tests because it's being disabled by default
|
376
|
+
by more and more installations as it has known vulnerabilities
|
377
|
+
and is no longer considered to be acceptable by several compliance
|
378
|
+
standards (e.g. PCI DSS).
|
379
|
+
|
380
|
+
### Improved Synchronisation for channel.close Handlers
|
381
|
+
|
382
|
+
`channel.close` handler will now acquire a lock . This avoids concurrency
|
383
|
+
hazards in some rare scenarios when a channel is closed due a protocol
|
384
|
+
exception by the server and concurrently opened by user code
|
385
|
+
at the same time.
|
386
|
+
|
387
|
+
### More Meaningful Error Messages in Bunny::Session#create_channel
|
388
|
+
|
389
|
+
Sometimes users attempt to open a channel on a connection that
|
390
|
+
isn't connected yet because `Bunny::Session#start` was never invoked.
|
391
|
+
|
392
|
+
`Bunny::Session#create_channel` will now provide a more sensible exception message
|
393
|
+
in those cases.
|
394
|
+
|
395
|
+
|
396
|
+
## Changes between Bunny 2.6.0 and 2.7.0 (May 11th, 2017)
|
397
|
+
|
398
|
+
### amq-protocol Update
|
399
|
+
|
400
|
+
Minimum `amq-protocol` version is now [`2.2.0`](https://github.com/ruby-amqp/amq-protocol/blob/master/ChangeLog.md#changes-between-210-and-220-may-11th-2017) which includes
|
401
|
+
a change in [how timestamps are encoded](https://github.com/ruby-amqp/amq-protocol/issues/64).
|
402
|
+
|
403
|
+
|
404
|
+
### `Bunny::ContinuationQueue#poll` Less Prone to Race Conditions
|
405
|
+
|
406
|
+
`Bunny::ContinuationQueue#poll` was reworked with feedback from Joseph Wong.
|
407
|
+
|
408
|
+
GitHub issue: [#462](https://github.com/ruby-amqp/bunny/issues/462)
|
409
|
+
|
410
|
+
|
411
|
+
### Recovery Attempt Counting Strategy Changed
|
412
|
+
|
413
|
+
Previous behehavior is not unreasonable but is not what many users and
|
414
|
+
even RabbitMQ team members come to expect. Therefore it can be
|
415
|
+
considered a bug.
|
416
|
+
|
417
|
+
Previously a reconnection counter was preserved between successful
|
418
|
+
recoveries. This made the integration test that uses server-sent
|
419
|
+
connection.close possible.
|
420
|
+
|
421
|
+
With this change, the counter is reset after successful reconnection
|
422
|
+
but there's an option to go back to the original behavior. We also do
|
423
|
+
a hell of a lot more logging.
|
424
|
+
|
425
|
+
GitHub issue: [#408](https://github.com/ruby-amqp/bunny/issues/408)
|
426
|
+
|
427
|
+
|
428
|
+
### Absolute Windows File Paths are No Longer treated as Inline Certs
|
429
|
+
|
430
|
+
Contributed by Jared Smartt.
|
431
|
+
|
432
|
+
GitHub issue: [#492](https://github.com/ruby-amqp/bunny/issues/492).
|
433
|
+
|
434
|
+
|
435
|
+
### Opening a Channel on an Intentionally Closed Connection Immediately Raises an Exception
|
436
|
+
|
437
|
+
Contributed by Alessandro Verlato.
|
438
|
+
|
439
|
+
GitHub issue: [#465](https://github.com/ruby-amqp/bunny/issues/465)
|
440
|
+
|
441
|
+
|
442
|
+
### Bunny::ConsumerWorkPool#shutdown Terminates Early When It's Safe to Do So
|
443
|
+
|
444
|
+
`Bunny::ConsumerWorkPool#shutdown(true)` waited for consumer shutdown
|
445
|
+
even if the pool wasn't active (there were no consumers on its
|
446
|
+
channel).
|
447
|
+
|
448
|
+
GitHub issue: [#438](https://github.com/ruby-amqp/bunny/issues/438).
|
449
|
+
|
450
|
+
|
451
|
+
### Retry on new Ruby 2.1+ variations of `EAGAIN`, `EWOULDBLOCK`
|
452
|
+
|
453
|
+
GitHub issue: [#456](https://github.com/ruby-amqp/bunny/issues/456)
|
454
|
+
|
455
|
+
|
456
|
+
### Do Not Modify Host Arrays
|
457
|
+
|
458
|
+
Bunny now can work with frozen host arrays.
|
459
|
+
|
460
|
+
GitHub issue: [#446](https://github.com/ruby-amqp/bunny/issues/446)
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
## Changes between Bunny 2.5.0 and 2.6.0 (October 15th, 2016)
|
465
|
+
|
466
|
+
### Graceful Shutdown of Consumers
|
467
|
+
|
468
|
+
Consumer work pool will now allow for a grace period before stopping
|
469
|
+
pool threads so that delivery processing in progress can have a chance to finish.
|
470
|
+
|
471
|
+
GitHub issue: [#437](https://github.com/ruby-amqp/bunny/pull/437)
|
472
|
+
|
473
|
+
Contributed by Stefan Sedich.
|
474
|
+
|
475
|
+
### `Bunny::Channel#wait_for_confirms` Now Throws When Used on a Closed Channel
|
476
|
+
|
477
|
+
GitHub issue: [#428](https://github.com/ruby-amqp/bunny/pull/428)
|
478
|
+
|
479
|
+
Contributed by Dimitar Dimitrov.
|
480
|
+
|
481
|
+
### Race Condition Eliminated in `Bunny::Channel#wait_for_confirms`
|
482
|
+
|
483
|
+
GitHub issue: [#424](https://github.com/ruby-amqp/bunny/issues/424)
|
484
|
+
|
485
|
+
Contributed by Dimitar Dimitrov.
|
486
|
+
|
487
|
+
### More Defensive Consumer Work Pool
|
488
|
+
|
489
|
+
`Bunny::ConsumerWorkPool#join` and `Bunny::ConsumerWorkPool#pause`
|
490
|
+
no longer fails with a `NoMethodError` on nil when executed
|
491
|
+
on a work pool that doesn't have active threads (consumers).
|
492
|
+
|
493
|
+
This change is largely cosmetic and won't affect the majority
|
494
|
+
of of projects in any way.
|
495
|
+
|
496
|
+
|
497
|
+
## Changes between Bunny 2.4.0 and 2.5.0 (July 20th, 2016)
|
498
|
+
|
499
|
+
### Exchange Bindings are Now Correctly Recovered
|
500
|
+
|
501
|
+
GitHub issue: [#410](https://github.com/ruby-amqp/bunny/issues/410)
|
502
|
+
|
503
|
+
Contributed by Andrew Bruce.
|
504
|
+
|
505
|
+
|
506
|
+
### `Bunny::Channel#wait_for_confirms` Awaits While There're Outstanding Unconfirmed Messages
|
507
|
+
|
508
|
+
GitHub issue: [#424](https://github.com/ruby-amqp/bunny/issues/424)
|
509
|
+
|
510
|
+
Contributed by Dimitar Dimitrov.
|
511
|
+
|
512
|
+
|
513
|
+
### Queue Recovery Respects the `:no_declare` Option
|
514
|
+
|
515
|
+
Queue recovery now respects the `:no_declare` option.
|
516
|
+
|
517
|
+
|
518
|
+
### `Bunny::Channel#wait_for_confirms` Throws Early
|
519
|
+
|
520
|
+
`Bunny::Channel#wait_for_confirms` now throws an exception
|
521
|
+
early when invoked on a closed channel.
|
522
|
+
|
523
|
+
GitHub issue: [#428](https://github.com/ruby-amqp/bunny/pull/428).
|
524
|
+
|
525
|
+
Contributed by Dimitar Dimitrov.
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
## Changes between Bunny 2.3.0 and 2.4.0 (June 11th, 2016)
|
530
|
+
|
531
|
+
**This release includes minor breaking API changes**.
|
532
|
+
|
533
|
+
### Unconfirmed Delivery Tag Set Reset on Network Recovery
|
534
|
+
|
535
|
+
Channels will now reset their unconfirmed delivery tag set after
|
536
|
+
recovery.
|
537
|
+
|
538
|
+
GitHub issue: [#406](https://github.com/ruby-amqp/bunny/pull/406)
|
539
|
+
|
540
|
+
Contributed by Bill Ruddock.
|
541
|
+
|
542
|
+
### Support (Quoted) IPv6 Addresses in Address Lists
|
543
|
+
|
544
|
+
GitHub issue: [#383](https://github.com/ruby-amqp/bunny/issues/383).
|
545
|
+
|
546
|
+
Contributed by Jeremy Heiler.
|
547
|
+
|
548
|
+
### Transport#read_fully Doesn't Try to Recover
|
549
|
+
|
550
|
+
Since transport is replaced by a recovering connection
|
551
|
+
anyway, and this produces confusing errors up the stack.
|
552
|
+
|
553
|
+
GitHub issue: [#359](https://github.com/ruby-amqp/bunny/issues/359)
|
554
|
+
|
555
|
+
Contributed by Donal McBreen.
|
556
|
+
|
557
|
+
### Client-Provided Session `:properties` Merged with Defaults
|
558
|
+
|
559
|
+
Client-Provided Session `:properties` will now be merged with defaults
|
560
|
+
instead of replacing them. This makes it much more convenient to
|
561
|
+
override a single key.
|
562
|
+
|
563
|
+
### More Predictable RABBITMQ_URL Handling
|
564
|
+
|
565
|
+
**This is a breaking API change**.
|
566
|
+
|
567
|
+
`RABBITMQ_URL` no longer will be used if any other
|
568
|
+
connection options are provided. This makes it possible
|
569
|
+
to use `RABBITMQ_URL` for some connections and options
|
570
|
+
for others in a single OS process.
|
571
|
+
|
572
|
+
GitHub issue: [#403](https://github.com/ruby-amqp/bunny/pull/403)
|
573
|
+
|
574
|
+
Contributed by Jimmy Petersen.
|
575
|
+
|
576
|
+
|
577
|
+
## Changes between Bunny 2.2.0 and 2.3.0 (Feb 26th, 2016)
|
578
|
+
|
579
|
+
### Thread#abort_on_exception Setting for Consumer Work Pool Threads
|
580
|
+
|
581
|
+
`Bunny::Session#create_channel` now supports a 3rd argument that,
|
582
|
+
when set to `true`, makes consumer work pool threads to have
|
583
|
+
`Thread#abort_on_exception` set on them.
|
584
|
+
|
585
|
+
GH issue: [#382](https://github.com/ruby-amqp/bunny/pull/382)
|
586
|
+
|
587
|
+
Contributed by Seamus Abshere.
|
588
|
+
|
589
|
+
### Explicit Transport Closure on Recovery
|
590
|
+
|
591
|
+
Bunny now will explicitly close previosly used transport before starting
|
592
|
+
connection recovery.
|
593
|
+
|
594
|
+
GitHub issue: [#377](https://github.com/ruby-amqp/bunny/pull/377).
|
595
|
+
|
596
|
+
Contributed by bkanhoopla.
|
597
|
+
|
598
|
+
### No TLS Socket Double-init
|
599
|
+
|
600
|
+
Makes sure that TLS sockets are not double-initialized.
|
601
|
+
|
602
|
+
GH issue: [#345](https://github.com/ruby-amqp/bunny/issues/345).
|
603
|
+
|
604
|
+
Contributed by Carl Hörberg.
|
605
|
+
|
606
|
+
### Lazily Evaluated Debug Log Strings
|
607
|
+
|
608
|
+
GH issue: [#375](https://github.com/ruby-amqp/bunny/pull/375)
|
609
|
+
|
610
|
+
Contributed by Omer Katz.
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
## Changes between Bunny 2.1.0 and 2.2.0 (Sep 6th, 2015)
|
615
|
+
|
616
|
+
### Add :addresses to connect options
|
617
|
+
|
618
|
+
Before this the connection options only allowed multiple hosts, an
|
619
|
+
address is a combination of a host and a port. This makes it possible to
|
620
|
+
specify different hosts with different ports.
|
621
|
+
|
622
|
+
Contributed by Bart van Zon (Tele2).
|
623
|
+
|
624
|
+
### Recover from connection.close by default
|
625
|
+
|
626
|
+
Bunny will now try to reconnect also when server sent connection.close is
|
627
|
+
received, e.g. when a server is restarting (but also when the connection is
|
628
|
+
force closed by the server). This is in-line with how many other clients behave.
|
629
|
+
The old default was `recover_from_connection_close: false`.
|
630
|
+
|
631
|
+
Contributed by Carl Hörberg (CloudAMQP).
|
632
|
+
|
633
|
+
|
634
|
+
## Changes between Bunny 2.0.0 and 2.1.0
|
635
|
+
|
636
|
+
Bunny 2.1.0 has an **important breaking change**. It is highly
|
637
|
+
advised that 2.1.0 is not mixed with earlier versions of Bunny
|
638
|
+
in case your applications include **integers in message headers**.
|
639
|
+
|
640
|
+
### Integer Value Serialisation in Headers
|
641
|
+
|
642
|
+
Integer values in headers are now serialised as signed 64-bit integers. Previously
|
643
|
+
they were serialised as 32-bit unsigned integers, causing both underflows
|
644
|
+
and overflows: incorrect values were observed by consumers.
|
645
|
+
|
646
|
+
It is highly
|
647
|
+
advised that 2.1.0 is not mixed with earlier versions of Bunny
|
648
|
+
in case your applications include integers in message headers.
|
649
|
+
|
650
|
+
If that's not the case, Bunny 2.1 will integeroperate with any earlier version
|
651
|
+
starting with 0.9.0 just fine. Popular clients in other languages
|
652
|
+
(e.g. Java and .NET) will interoperate with Bunny 2.1.0 without
|
653
|
+
issues.
|
654
|
+
|
655
|
+
|
656
|
+
### Explicit Ruby 2.0 Requirement
|
657
|
+
|
658
|
+
Bunny now requires Ruby 2.0 in the gemspec.
|
659
|
+
|
660
|
+
Contributed by Carl Hörberg.
|
661
|
+
|
662
|
+
### JRuby Fix
|
663
|
+
|
664
|
+
Bunny runs again on JRuby. Note that
|
665
|
+
JRuby users are strongly advised to use March Hare instead.
|
666
|
+
|
667
|
+
Contributed by Teodor Pripoae.
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
## Changes between Bunny 1.7.0 and 2.0.0
|
672
|
+
|
673
|
+
Bunny `2.0` doesn't have any breaking API changes
|
674
|
+
but drops Ruby 1.8 and 1.9 (both EOL'ed) support,
|
675
|
+
hence the version.
|
676
|
+
|
677
|
+
### Minimum Required Ruby Version is 2.0
|
678
|
+
|
679
|
+
Bunny `2.0` requires Ruby 2.0 or later.
|
680
|
+
|
681
|
+
## Non-Blocking Writes
|
682
|
+
|
683
|
+
Bunny now uses non-blocking socket writes, uses a reduced
|
684
|
+
number of writes for message publishing (frames are batched
|
685
|
+
into a single write), and handles TCP back pressure from
|
686
|
+
RabbitMQ better.
|
687
|
+
|
688
|
+
Contributed by Irina Bednova and Michael Klishin.
|
689
|
+
|
690
|
+
### Reduced Timeout Use
|
691
|
+
|
692
|
+
`Bunny::ContinuationQueue#poll` no longer relies on Ruby's `Timeout` which has
|
693
|
+
numerous issues, including starting a new "interruptor" thread per operation,
|
694
|
+
which is far from efficient.
|
695
|
+
|
696
|
+
Contributed by Joe Eli McIlvain and Carl Hörberg.
|
697
|
+
|
698
|
+
### Capped Number of Connection Recovery Attempts
|
699
|
+
|
700
|
+
`:recovery_attempts` is a new option that limits the number of
|
701
|
+
connection recovery attempts performed by Bunny. `nil` means
|
702
|
+
"no limit".
|
703
|
+
|
704
|
+
Contributed by Irina Bednova.
|
705
|
+
|
706
|
+
### Bunny::Channel#basic_ack and Related Methods Improvements
|
707
|
+
|
708
|
+
`Bunny::Channel#basic_ack`, `Bunny::Channel#basic_nack`, and `Bunny::Channel#basic_reject`
|
709
|
+
now adjust delivery tags between connection recoveries, as well as have a default value for
|
710
|
+
the second argument.
|
711
|
+
|
712
|
+
Contributed by Wayne Conrad.
|
713
|
+
|
714
|
+
### Logger Output Remains Consistent
|
715
|
+
|
716
|
+
Setting the `@logger.progname` attribute changes the output of the logger.
|
717
|
+
This is not expected behaviour when the client provides a custom logger.
|
718
|
+
Behaviour remains unchainged when the internally initialized logger is used.
|
719
|
+
|
720
|
+
Contributed by Justin Carter.
|
721
|
+
|
722
|
+
### prefetch_count is Limited to 65535
|
723
|
+
|
724
|
+
Since `basic.qos`'s `prefetch_count` field is of type `short` in the protocol,
|
725
|
+
Bunny must enforce its maximum allowed value to `2^16 - 1` to avoid
|
726
|
+
confusing issues due to overflow.
|
727
|
+
|
728
|
+
### Per-Consumer and Per-Channel Prefetch
|
729
|
+
|
730
|
+
Recent RabbitMQ versions support `basic.qos` `global` flag, controlling whether
|
731
|
+
`prefetch` applies per-consumer or per-channel. Bunny `Channel#prefetch` now
|
732
|
+
allows flag to be set as optional parameter, with the same default behaviour as
|
733
|
+
before (per-consumer).
|
734
|
+
|
735
|
+
Contributed by tiredpixel.
|
736
|
+
|
737
|
+
|
1
738
|
## Changes between Bunny 1.6.0 and 1.7.0
|
2
739
|
|
3
740
|
### TLS Peer Verification Enabled by Default
|
@@ -118,6 +855,13 @@ Connection shuffling and robustness improvements.
|
|
118
855
|
|
119
856
|
Contributed by Andre Foeken (Nedap).
|
120
857
|
|
858
|
+
### Default Channel Removed
|
859
|
+
|
860
|
+
Breaks compatibility with Bunny 0.8.x.
|
861
|
+
|
862
|
+
`Bunny:Session#default_channel` was removed. Please open channels explicitly now,
|
863
|
+
as all the examples in the docs do.
|
864
|
+
|
121
865
|
|
122
866
|
## Changes between Bunny 1.3.0 and 1.4.0
|
123
867
|
|
@@ -531,7 +1275,7 @@ Bunny now will use the following TLS/SSL CA's paths on Linux by default:
|
|
531
1275
|
and will log a warning if no CA files are available via default paths
|
532
1276
|
or `:tls_ca_certificates`.
|
533
1277
|
|
534
|
-
Contributed by Carl
|
1278
|
+
Contributed by Carl Hörberg.
|
535
1279
|
|
536
1280
|
### Consumers Can Be Re-Registered From Bunny::Consumer#handle_cancellation
|
537
1281
|
|