amq-protocol 2.5.1 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bd349803818e5eee9dbba49cdf59fad9666e8e7ed95229ed1bc7e7a4380fde5
4
- data.tar.gz: b52bae3819d6fae2b2c6db5e1626ef6b98de74b0d24532b12f9a88ac75278ceb
3
+ metadata.gz: 1c88e7605bb8cf664993429123aab42370d5f8772f6ae70792ad2e64fd16051a
4
+ data.tar.gz: 74c708d7dcf7fa7a136728e845b306b7ee4d5ce56c248cbaf24659d3a3de4b9b
5
5
  SHA512:
6
- metadata.gz: 9a138a490585effe6886c7b16f4bb4c0a9d7f878358bca45ee437ae714ebcef4375b9f684651e593906db4d61dabd9468290ee3b75f1ca2810f8855f82e6942c
7
- data.tar.gz: 7f64f831d2cdca5885ab08967c3700519acf90c327307e79bac757a58b56d3a02acc3bbd41731a456b52f9b92f0678a1d5c7d0c68eff94febb09bc0b45239ded
6
+ metadata.gz: d6a6442583dfdb00958f6860df51a0fdfea871ff7defb3a459bbffd8e197217e6b611a034466ea41b0a2adb1203c4b873f9e81a60b27858dd4498f105eda6e48
7
+ data.tar.gz: 8859c61e44da33a17515ac51953178f2d55824b230677da2d750c8acc9ee0a3818a858800ba705a8a2c6115709375f7777970a0506acc61847362a7871b7fd8d
data/ChangeLog.md CHANGED
@@ -1,4 +1,23 @@
1
- ## Changes between 2.5.0 and 2.5.1 (Jan 1, 2026)
1
+ ## Changes between 2.6.0 and 2.7.0 (Mar 31, 2026)
2
+
3
+ ### Channel.Close Predicates Now Return True Boolean
4
+
5
+ And not just truthy values (values that are not `nil` or `false`).
6
+
7
+
8
+ ## Changes between 2.5.1 and 2.6.0 (Mar 30, 2026)
9
+
10
+ ### Channel.Close Predicate Methods
11
+
12
+ `Channel::Close` now provides predicate methods for identifying common
13
+ channel closure reasons by reply code and text:
14
+
15
+ * `#delivery_ack_timeout?`: consumer [delivery acknowledgement timeout](https://www.rabbitmq.com/docs/consumers#acknowledgement-timeout)
16
+ * `#unknown_delivery_tag?`: unknown delivery tag (e.g. [double ack](https://www.rabbitmq.com/docs/channels#error-handling))
17
+ * `#message_too_large?`: message exceeded the configured max size
18
+
19
+
20
+ ## Changes between 2.5.0 and 2.5.1 (Jan 19, 2026)
2
21
 
3
22
  ### Windows Installation Fixes
4
23
 
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  Copyright (c) 2010 – 2011 Jakub Šťastný aka Botanicus
2
- Copyright (c) 2011 – 2016 Michael S. Klishin <michael@defprotocol.org>
2
+ Copyright (c) 2011 – 2026 Michael S. Klishin <michael@defprotocol.org>
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
5
5
  a copy of this software and associated documentation files (the
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AMQ
4
+ module Protocol
5
+ class Channel
6
+ class Close
7
+ # @return [Boolean] true if the channel was closed due to a consumer delivery acknowledgement timeout
8
+ def delivery_ack_timeout?
9
+ reply_code == 406 && reply_text.match?(/delivery acknowledgement on channel \d+ timed out/)
10
+ end
11
+
12
+ # @return [Boolean] true if the channel was closed due to an unknown delivery tag (e.g. double ack)
13
+ def unknown_delivery_tag?
14
+ reply_code == 406 && reply_text.match?(/unknown delivery tag/)
15
+ end
16
+
17
+ # @return [Boolean] true if the channel was closed because a message exceeded the configured max size
18
+ def message_too_large?
19
+ reply_code == 406 && reply_text.match?(/larger than configured max size/)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,5 +1,5 @@
1
1
  module AMQ
2
2
  module Protocol
3
- VERSION = "2.5.1"
3
+ VERSION = "2.7.0"
4
4
  end # Protocol
5
5
  end # AMQ
data/lib/amq/protocol.rb CHANGED
@@ -2,3 +2,4 @@
2
2
 
3
3
  require "amq/protocol/version"
4
4
  require "amq/protocol/client"
5
+ require "amq/protocol/channel_close"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amq-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Stastny
@@ -10,7 +10,7 @@ authors:
10
10
  - Mark Abramov
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-01-20 00:00:00.000000000 Z
13
+ date: 1980-01-02 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: |2
16
16
  amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not a
@@ -30,6 +30,7 @@ files:
30
30
  - lib/amq/int_allocator.rb
31
31
  - lib/amq/pack.rb
32
32
  - lib/amq/protocol.rb
33
+ - lib/amq/protocol/channel_close.rb
33
34
  - lib/amq/protocol/client.rb
34
35
  - lib/amq/protocol/constants.rb
35
36
  - lib/amq/protocol/exceptions.rb
@@ -60,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
62
63
  requirements: []
63
- rubygems_version: 3.6.2
64
+ rubygems_version: 3.6.7
64
65
  specification_version: 4
65
66
  summary: AMQP 0.9.1 encoding & decoding library.
66
67
  test_files: []