async-rabbitmq 0.6.0 → 0.7.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/CHANGELOG.md +14 -0
- data/lib/async_rabbitmq/channel.rb +11 -4
- data/lib/async_rabbitmq/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: acf485922e3e284c6d637b9047d44e521402e466f43e9cc7158cd7e880653559
|
|
4
|
+
data.tar.gz: 887b7316e17d2d0dce494cb4f9663dc341361a02cc89b621e7f1855bc2af9568
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c5fe4cebf5dddc0dfb80a00fafb96e83be3578cb08f8b2f969599ace41dc644b46a1a05abdd878ad0bf8746182724d124a5ab83d4aabedd556f149dfb7ff741
|
|
7
|
+
data.tar.gz: 7b04b91fa3fffff2fc863a151bc4346e57b7e976ba2cffd3f0242dfd576e0c1f5467f036878acfec875c005ee43a582ed183fd9c28fa9a3d385cb3ab722ee9fb
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.7.0] - 2026-10-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- A consumer's `on_error:` survives re-registration after a reconnect or a channel reopen; it no
|
|
10
|
+
longer falls back to the channel default.
|
|
11
|
+
- A consumer's `exclusive:` flag and `arguments:` (such as `x-priority`) survive re-registration
|
|
12
|
+
after a reconnect or a channel reopen; they no longer come back as the defaults.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `Channel#each` passes its remaining keywords to `basic_consume`, so `on_error:`, `exclusive:`
|
|
17
|
+
and `arguments:` work there as they do on the other two ways to start a consumer.
|
|
18
|
+
|
|
5
19
|
## [0.6.0] - 2026-10-11
|
|
6
20
|
|
|
7
21
|
### Fixed
|
|
@@ -483,8 +483,11 @@ module AsyncRabbitMQ
|
|
|
483
483
|
AMQ::Protocol::Basic::Consume.encode(@channel_id, queue_name, consumer_tag, false, !manual_ack, exclusive, false, arguments),
|
|
484
484
|
AMQ::Protocol::Basic::ConsumeOk
|
|
485
485
|
)
|
|
486
|
+
# Everything basic.consume was called with, so re_register_consumers can
|
|
487
|
+
# reproduce the consumer exactly rather than a default-valued lookalike.
|
|
486
488
|
@consumers[resp.consumer_tag] = { queue_name: queue_name, block: block,
|
|
487
|
-
manual_ack: manual_ack, on_error: on_error
|
|
489
|
+
manual_ack: manual_ack, on_error: on_error,
|
|
490
|
+
exclusive: exclusive, arguments: arguments }
|
|
488
491
|
topology&.record_consumer(resp.consumer_tag, queue_name)
|
|
489
492
|
instrument("consumer.registered") do
|
|
490
493
|
{ channel: @channel_id, queue: queue_name, consumer_tag: resp.consumer_tag, manual_ack: manual_ack }
|
|
@@ -692,9 +695,11 @@ module AsyncRabbitMQ
|
|
|
692
695
|
# the broker cancels the consumer (e.g. the queue is deleted) or closes the
|
|
693
696
|
# channel. A connection loss with automatic recovery is transparent: the
|
|
694
697
|
# consumer is re-registered and #each keeps waiting.
|
|
695
|
-
|
|
698
|
+
# Remaining keywords go to #basic_consume, so +on_error+, +exclusive+ and
|
|
699
|
+
# +arguments+ work here as they do there.
|
|
700
|
+
def each(queue_name, manual_ack: false, **opts, &block)
|
|
696
701
|
assert_open!
|
|
697
|
-
tag = basic_consume(queue_name, manual_ack: manual_ack, &block)
|
|
702
|
+
tag = basic_consume(queue_name, manual_ack: manual_ack, **opts, &block)
|
|
698
703
|
cond = @each_waiters[tag] = Async::Condition.new
|
|
699
704
|
cond.wait
|
|
700
705
|
nil
|
|
@@ -1638,7 +1643,9 @@ module AsyncRabbitMQ
|
|
|
1638
1643
|
def re_register_consumers
|
|
1639
1644
|
@consumers.each do |tag, entry|
|
|
1640
1645
|
begin
|
|
1641
|
-
basic_consume(entry[:queue_name], consumer_tag: tag, manual_ack: entry[:manual_ack],
|
|
1646
|
+
basic_consume(entry[:queue_name], consumer_tag: tag, manual_ack: entry[:manual_ack],
|
|
1647
|
+
exclusive: entry[:exclusive], arguments: entry[:arguments] || {},
|
|
1648
|
+
on_error: entry[:on_error], &entry[:block])
|
|
1642
1649
|
rescue => e
|
|
1643
1650
|
# Typically 404: the queue is gone and was not recovered. The broker
|
|
1644
1651
|
# closes the channel on that, so say so instead of failing silently.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-rabbitmq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Russell Penney
|
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
174
174
|
- !ruby/object:Gem::Version
|
|
175
175
|
version: '0'
|
|
176
176
|
requirements: []
|
|
177
|
-
rubygems_version:
|
|
177
|
+
rubygems_version: 4.0.20
|
|
178
178
|
specification_version: 4
|
|
179
179
|
summary: Fiber-native Ruby AMQP 0-9-1 client built on the Async ecosystem
|
|
180
180
|
test_files: []
|