bunny 2.18.0 → 2.19.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.
- checksums.yaml +4 -4
- data/README.md +29 -10
- data/lib/bunny/channel.rb +1 -1
- data/lib/bunny/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6de535f1d386dbf46fd89a733c1c44915280af55c3cc3cc56467abe0ead9c24
|
4
|
+
data.tar.gz: 6048aea84078fb8995718ed774d9a3956dc91645b24c09382cd54283b444aabe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3575710f81dabf6c116c92c4ac1807a29f0c0bcd1bd5fb35ae1fd9dd468df193efac49d0ad5e77ef04ecc53e97b9b4e13e70f4207972ba0c2335c28afcd6c9b
|
7
|
+
data.tar.gz: 8b90dd4da7dab28b529e78cf1282656ca1904432b1017ee5574545c1972315f975d175c718481372604b61796e9ae56b293a342dcba800fa0929e4b80cd7a3c4
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ Specific examples:
|
|
47
47
|
|
48
48
|
Modern Bunny versions support
|
49
49
|
|
50
|
-
* CRuby 2.
|
50
|
+
* CRuby 2.5 through 3.0 (inclusive)
|
51
51
|
|
52
52
|
Bunny works sufficiently well on JRuby but there are known
|
53
53
|
JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should
|
@@ -70,10 +70,8 @@ a stable public API.
|
|
70
70
|
Change logs per release series:
|
71
71
|
|
72
72
|
* [master](https://github.com/ruby-amqp/bunny/blob/master/ChangeLog.md)
|
73
|
+
* [2.18.x](https://github.com/ruby-amqp/bunny/blob/2.18.x-stable/ChangeLog.md)
|
73
74
|
* [2.17.x](https://github.com/ruby-amqp/bunny/blob/2.17.x-stable/ChangeLog.md)
|
74
|
-
* [2.16.x](https://github.com/ruby-amqp/bunny/blob/2.16.x-stable/ChangeLog.md)
|
75
|
-
* [2.15.x](https://github.com/ruby-amqp/bunny/blob/2.15.x-stable/ChangeLog.md)
|
76
|
-
* [2.14.x](https://github.com/ruby-amqp/bunny/blob/2.14.x-stable/ChangeLog.md)
|
77
75
|
|
78
76
|
|
79
77
|
|
@@ -96,7 +94,7 @@ gem install bunny
|
|
96
94
|
To use Bunny in a project managed with Bundler:
|
97
95
|
|
98
96
|
``` ruby
|
99
|
-
gem "bunny", ">= 2.
|
97
|
+
gem "bunny", ">= 2.18.0"
|
100
98
|
```
|
101
99
|
|
102
100
|
|
@@ -116,20 +114,31 @@ conn.start
|
|
116
114
|
|
117
115
|
# open a channel
|
118
116
|
ch = conn.create_channel
|
117
|
+
ch.confirm_select
|
119
118
|
|
120
119
|
# declare a queue
|
121
120
|
q = ch.queue("test1")
|
121
|
+
q.subscribe(manual_ack: true) do |delivery_info, metadata, payload|
|
122
|
+
puts "This is the message: #{payload}"
|
123
|
+
# acknowledge the delivery so that RabbitMQ can mark it for deletion
|
124
|
+
ch.ack(delivery_info.delivery_tag)
|
125
|
+
end
|
122
126
|
|
123
127
|
# publish a message to the default exchange which then gets routed to this queue
|
124
128
|
q.publish("Hello, everybody!")
|
125
129
|
|
126
|
-
#
|
127
|
-
|
130
|
+
# await confirmations from RabbitMQ, see
|
131
|
+
# https://www.rabbitmq.com/publishers.html#data-safety for details
|
132
|
+
ch.wait_for_confirms
|
128
133
|
|
129
|
-
|
134
|
+
# give the above consumer some time consume the delivery and print out the message
|
135
|
+
sleep 1
|
130
136
|
|
137
|
+
puts "Done"
|
138
|
+
|
139
|
+
ch.close
|
131
140
|
# close the connection
|
132
|
-
conn.
|
141
|
+
conn.close
|
133
142
|
```
|
134
143
|
|
135
144
|
|
@@ -141,7 +150,7 @@ For a 15 minute tutorial using more practical examples, see [Getting Started wit
|
|
141
150
|
|
142
151
|
### Guides
|
143
152
|
|
144
|
-
|
153
|
+
Bunny documentation guides are available at [rubybunny.info](http://rubybunny.info):
|
145
154
|
|
146
155
|
* [Queues and Consumers](http://rubybunny.info/articles/queues.html)
|
147
156
|
* [Exchanges and Publishers](http://rubybunny.info/articles/exchanges.html)
|
@@ -153,6 +162,16 @@ Other documentation guides are available at [rubybunny.info](http://rubybunny.in
|
|
153
162
|
* [Using RabbitMQ Extensions with Bunny](http://rubybunny.info/articles/extensions.html)
|
154
163
|
* [Durability and Related Matters](http://rubybunny.info/articles/durability.html)
|
155
164
|
|
165
|
+
Some highly relevant RabbitMQ documentation guides:
|
166
|
+
|
167
|
+
* [Connections](https://www.rabbitmq.com/connections.html)
|
168
|
+
* [Channels](https://www.rabbitmq.com/channels.html)
|
169
|
+
* [Queues](https://www.rabbitmq.com/queues.html)
|
170
|
+
* [Publishers](https://www.rabbitmq.com/publishers.html)
|
171
|
+
* [Consumers](https://www.rabbitmq.com/consumers.html)
|
172
|
+
* Data safety: publisher and consumer [Confirmations](https://www.rabbitmq.com/confirms.html)
|
173
|
+
* [Production Checklist](https://www.rabbitmq.com/production-checklist.html)
|
174
|
+
|
156
175
|
### API Reference
|
157
176
|
|
158
177
|
[Bunny API Reference](http://reference.rubybunny.info/).
|
data/lib/bunny/channel.rb
CHANGED
@@ -1789,7 +1789,7 @@ module Bunny
|
|
1789
1789
|
# @private
|
1790
1790
|
def handle_ack_or_nack(delivery_tag_before_offset, multiple, nack)
|
1791
1791
|
delivery_tag = delivery_tag_before_offset + @delivery_tag_offset
|
1792
|
-
confirmed_range_start = multiple ? @delivery_tag_offset +
|
1792
|
+
confirmed_range_start = multiple ? @delivery_tag_offset + @unconfirmed_set.min : delivery_tag
|
1793
1793
|
confirmed_range_end = delivery_tag
|
1794
1794
|
confirmed_range = (confirmed_range_start..confirmed_range_end)
|
1795
1795
|
|
data/lib/bunny/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Duncan
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2021-
|
15
|
+
date: 2021-06-25 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|