bunny 2.23.0 → 3.0.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -36
  3. data/lib/amq/protocol/extensions.rb +2 -0
  4. data/lib/bunny/authentication/credentials_encoder.rb +2 -0
  5. data/lib/bunny/authentication/external_mechanism_encoder.rb +2 -0
  6. data/lib/bunny/authentication/plain_mechanism_encoder.rb +2 -0
  7. data/lib/bunny/channel.rb +778 -150
  8. data/lib/bunny/channel_id_allocator.rb +2 -0
  9. data/lib/bunny/concurrent/atomic_fixnum.rb +2 -0
  10. data/lib/bunny/concurrent/condition.rb +2 -0
  11. data/lib/bunny/concurrent/continuation_queue.rb +2 -0
  12. data/lib/bunny/concurrent/exception_accumulator.rb +115 -0
  13. data/lib/bunny/concurrent/synchronized_sorted_set.rb +2 -0
  14. data/lib/bunny/consumer.rb +4 -11
  15. data/lib/bunny/consumer_tag_generator.rb +2 -0
  16. data/lib/bunny/consumer_work_pool.rb +2 -0
  17. data/lib/bunny/cruby/socket.rb +36 -2
  18. data/lib/bunny/cruby/ssl_socket.rb +44 -1
  19. data/lib/bunny/delivery_info.rb +23 -15
  20. data/lib/bunny/exceptions.rb +33 -2
  21. data/lib/bunny/exchange.rb +27 -13
  22. data/lib/bunny/framing.rb +2 -0
  23. data/lib/bunny/get_response.rb +20 -14
  24. data/lib/bunny/heartbeat_sender.rb +4 -2
  25. data/lib/bunny/message_properties.rb +2 -0
  26. data/lib/bunny/queue.rb +31 -39
  27. data/lib/bunny/reader_loop.rb +9 -7
  28. data/lib/bunny/return_info.rb +18 -11
  29. data/lib/bunny/session.rb +387 -63
  30. data/lib/bunny/socket.rb +7 -12
  31. data/lib/bunny/ssl_socket.rb +7 -12
  32. data/lib/bunny/test_kit.rb +1 -0
  33. data/lib/bunny/timeout.rb +2 -0
  34. data/lib/bunny/timestamp.rb +3 -1
  35. data/lib/bunny/topology_recovery_filter.rb +71 -0
  36. data/lib/bunny/topology_registry.rb +824 -0
  37. data/lib/bunny/transport.rb +54 -49
  38. data/lib/bunny/version.rb +2 -1
  39. data/lib/bunny.rb +2 -1
  40. metadata +25 -14
  41. data/lib/bunny/concurrent/linked_continuation_queue.rb +0 -61
  42. data/lib/bunny/jruby/socket.rb +0 -57
  43. data/lib/bunny/jruby/ssl_socket.rb +0 -58
  44. data/lib/bunny/versioned_delivery_tag.rb +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b33407ce8bf5340f646d7f35f884b991da2c54b1e46e7c8bd31f65e75822cc22
4
- data.tar.gz: 8b4242b14294c62a4310f6f4921eabb54414d930756495ab1c9130559475593f
3
+ metadata.gz: 420677d5395cc80a5ca3f5c553d9112ae947afb5d5dfef04f4d6ee95e3256b69
4
+ data.tar.gz: 1305a730a263123d1cdb1aef37725b4021ffd76a26b77166242ecfb3f12f65eb
5
5
  SHA512:
6
- metadata.gz: 7ecfba958caee454e1105cd500a1d2f632340b8358469420802b8fbf029abdedc742bdae39ff9d2ad1b04cc4a7d7fd6bc26b1ff11fc282118c6c05fb688ff661
7
- data.tar.gz: 7b101718ac037ad85702432cdf865310e94c5a269348ceee714bc6e5630312415f87283360dbbe88577fa1b661ecc5e5f8086d59bbdd50098cfe5e528c757ea1
6
+ metadata.gz: '09f98c780d34e755191b9925517f724c1b3009c0de707899d86ad80a98732cc09cbb83f00a4e3bf7c68c9c8e481da21e9ae5c204fbb2c22790f1c70317b01840'
7
+ data.tar.gz: 48c53d2fc69c737d1580e216df84273f18fff9018bdd6355dc439cf837a4f22998dc383088c84bae57eebf1c5476b08b8c7a21fb6fef2dd01c9eec0c4a7b9d63
data/README.md CHANGED
@@ -43,40 +43,45 @@ Specific examples:
43
43
  Web applications that display that information in the real time.
44
44
 
45
45
 
46
+ ## Ports to Other Languages
47
+
48
+ Bunny has inspired a number of other RabbitMQ (AMQP 0-9-1) client libraries
49
+ that closely follow its feature set and API shape, form and ergonomics.
50
+
51
+ * [Swift 6](https://github.com/michaelklishin/bunny-swift)
52
+
53
+
46
54
  ## Supported Ruby Versions
47
55
 
48
56
  Modern Bunny versions support
49
57
 
50
- * CRuby 2.6 through 3.1 (inclusive)
58
+ * CRuby 3.2 through 4.0 (inclusive)
51
59
  * [TruffleRuby](https://www.graalvm.org/ruby/)
52
60
 
53
61
  For environments that use TLS, Bunny expects Ruby installations to use a recent enough OpenSSL version that
54
- **includes support for TLS 1.3**.
62
+ **includes support for [TLS 1.3](https://www.rabbitmq.com/docs/ssl#tls1.3)**.
55
63
 
56
64
  ### JRuby
57
65
 
58
- Bunny works sufficiently well on JRuby but there are known
59
- JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should
60
- use [March Hare](http://rubymarchhare.info).
66
+ Bunny no longer supports JRuby.
61
67
 
62
- Bunny `1.7.x` was the last version to support CRuby 1.9.3 and 1.8.7
68
+ JRuby users should use [March Hare](https://github.com/ruby-amqp/march_hare), which has a similar API
69
+ and is built on top of the RabbitMQ Java client specifically for JRuby.
63
70
 
64
71
 
65
72
  ## Supported RabbitMQ Versions
66
73
 
67
- Modern Bunny releases target [currently supported RabbitMQ release series](https://www.rabbitmq.com/versions.html).
68
-
69
-
70
- ## Change Log
74
+ Modern Bunny releases target [currently community supported RabbitMQ release series](https://www.rabbitmq.com/release-information).
71
75
 
72
- Bunny is a mature library (started in early 2009) with
73
- a stable public API.
76
+ The protocol implemented by Bunny was first introduced in RabbitMQ 2.0 and has evolved
77
+ via extensions and with next to no breaking changes, so all key Bunny operations can be used with a wide range
78
+ of RabbitMQ versions, accounting for the few potentially breaking changes they
79
+ may introduce, e.g. the idempotency of `queue.delete` operations.
74
80
 
75
- Change logs per release series:
76
81
 
77
- * [main](https://github.com/ruby-amqp/bunny/blob/main/ChangeLog.md) (most notable changes for all release series)
78
- * [2.19.x](https://github.com/ruby-amqp/bunny/blob/2.19.x-stable/ChangeLog.md)
82
+ ## Change Log
79
83
 
84
+ [Change log](https://github.com/ruby-amqp/bunny/blob/main/ChangeLog.md).
80
85
 
81
86
 
82
87
  ## Installation & Bundler Dependency
@@ -90,7 +95,7 @@ Change logs per release series:
90
95
  To use Bunny in a project managed with Bundler:
91
96
 
92
97
  ``` ruby
93
- gem "bunny", ">= 2.19.0"
98
+ gem "bunny", ">= 3.0"
94
99
  ```
95
100
 
96
101
  ### With Rubygems
@@ -150,7 +155,7 @@ conn.close
150
155
 
151
156
  ### Getting Started
152
157
 
153
- For a 15 minute tutorial using more practical examples, see [Getting Started with RabbitMQ and Ruby using Bunny](http://rubybunny.info/articles/getting_started.html).
158
+ For a 15 minute tutorial using more practical examples, see [Getting Started with RabbitMQ and Ruby using Bunny](https://github.com/ruby-amqp/bunny/blob/main/docs/guides/getting_started.md).
154
159
 
155
160
  ### Guides
156
161
 
@@ -168,15 +173,15 @@ Bunny documentation guides are [under `docs/guides` in this repository](https://
168
173
 
169
174
  Some highly relevant RabbitMQ documentation guides:
170
175
 
171
- * [Connections](https://www.rabbitmq.com/connections.html)
172
- * [Channels](https://www.rabbitmq.com/channels.html)
173
- * [Queues](https://www.rabbitmq.com/queues.html)
174
- * [Quorum queues](https://www.rabbitmq.com/quorum-queues.html)
175
- * [Streams](https://rabbitmq.com/streams.html) (Bunny can perform basic operations on streams even though it does not implement the [RabbitMQ Stream protocol](https://github.com/rabbitmq/rabbitmq-server/blob/v3.10.x/deps/rabbitmq_stream/docs/PROTOCOL.adoc))
176
- * [Publishers](https://www.rabbitmq.com/publishers.html)
177
- * [Consumers](https://www.rabbitmq.com/consumers.html)
178
- * Data safety: publisher and consumer [Confirmations](https://www.rabbitmq.com/confirms.html)
179
- * [Production Checklist](https://www.rabbitmq.com/production-checklist.html)
176
+ * [Connections](https://www.rabbitmq.com/docs/connections)
177
+ * [Channels](https://www.rabbitmq.com/docs/channels)
178
+ * [Queues](https://www.rabbitmq.com/docs/queues)
179
+ * [Quorum queues](https://www.rabbitmq.com/docs/quorum-queues)
180
+ * [Streams](https://rabbitmq.com/docs/streams) (Bunny can perform basic operations on streams even though it does not implement the [RabbitMQ Stream protocol](https://github.com/rabbitmq/rabbitmq-server/blob/v4.0.x/deps/rabbitmq_stream/docs/PROTOCOL.adoc))
181
+ * [Publishers](https://www.rabbitmq.com/docs/publishers)
182
+ * [Consumers](https://www.rabbitmq.com/docs/consumers)
183
+ * Data safety: publisher and consumer [Confirmations](https://www.rabbitmq.com/docs/confirms)
184
+ * [Production Checklist](https://www.rabbitmq.com/docs/production-checklist)
180
185
 
181
186
  ### API Reference
182
187
 
@@ -187,17 +192,14 @@ Some highly relevant RabbitMQ documentation guides:
187
192
 
188
193
  ### Mailing List
189
194
 
190
- [Bunny has a mailing list](http://groups.google.com/group/ruby-amqp). Please use it for all questions,
191
- investigations, and discussions. GitHub issues should be used for specific, well understood, actionable
192
- maintainers and contributors can work on.
193
-
194
- We encourage you to also join the [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users)
195
- mailing list. Feel free to ask any questions that you may have.
196
-
195
+ Please use [GitHub Discussions](https://github.com/ruby-amqp/bunny/discussions) for questions.
197
196
 
198
- ## Continuous Integration
197
+ GitHub issues should be used for specific, well understood, actionable
198
+ maintainers and contributors can work on.
199
199
 
200
- [![Build Status](https://travis-ci.org/ruby-amqp/bunny.svg)](https://travis-ci.org/ruby-amqp/bunny/)
200
+ We encourage you to keep an eye on [RabbitMQ Discussions](https://github.com/rabbitmq/rabbitmq-server/discussions),
201
+ join the [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users)
202
+ and the [RabbitMQ Discord server](https://rabbitmq.com/discord).
201
203
 
202
204
 
203
205
  ### Reporting Issues
@@ -218,7 +220,7 @@ and steps to reproduce (or failing test cases).
218
220
  ## Other Ruby RabbitMQ Clients
219
221
 
220
222
  The other widely used Ruby RabbitMQ client is [March Hare](http://rubymarchhare.info) (JRuby-only).
221
- It's a mature library that require RabbitMQ 3.3.x or later.
223
+ It's a mature library that requires RabbitMQ 3.3.x or later.
222
224
 
223
225
 
224
226
  ## Contributing
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # @private
2
4
  module AMQ
3
5
  # @private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bunny
2
4
  # Contains credentials encoding implementations for various
3
5
  # authentication strategies.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bunny/authentication/credentials_encoder"
2
4
 
3
5
  module Bunny
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bunny/authentication/credentials_encoder"
2
4
 
3
5
  module Bunny