async-rabbitmq 0.7.0 → 0.7.1
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 +10 -0
- data/lib/async_rabbitmq/channel.rb +9 -5
- data/lib/async_rabbitmq/version.rb +1 -1
- data/lib/async_rabbitmq.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12f881a8b2274539cd1e93e8ea827140887f0a392952dcd123270acaf5d4aea3
|
|
4
|
+
data.tar.gz: 94ad7522a6b7c33d5cde8b892c0629b5db4961b9eb289c4efc6ab6c3f7286c66
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed9504ed356545629ff40c48ee8e3d7dadd6482538fff0bd3539c2c48dcb020c3b5949538dd1382a4b9b4f5bd650986eda6782efe7b9ce10545e047474788cae
|
|
7
|
+
data.tar.gz: cca32432f4ca23fc9b32150ce48684d9fde94feb8a0f9b9927e7186d4de59e6ee32677d3a437549559013e9c94a8350e5ea40eeb1c4f748ef9418470af2c593e
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.7.1] - 2026-10-18
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `AsyncRabbitMQ::DEFAULT_CONTENT_TYPE` and `AsyncRabbitMQ::Channel::DEFAULT_CONTENT_TYPE` constants (`"application/octet-stream"`).
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Default publish properties aligned with Bunny parity: `content_type` defaults to `"application/octet-stream"`, `persistent` defaults to `true` (`delivery_mode: 2`), and `priority` defaults to `0`.
|
|
14
|
+
|
|
5
15
|
## [0.7.0] - 2026-10-17
|
|
6
16
|
|
|
7
17
|
### Fixed
|
|
@@ -37,6 +37,8 @@ module AsyncRabbitMQ
|
|
|
37
37
|
# delivery the verbs are otherwise equivalent.
|
|
38
38
|
ERROR_DISPOSITIONS = %i[dead_letter retry release leave].freeze
|
|
39
39
|
|
|
40
|
+
DEFAULT_CONTENT_TYPE = "application/octet-stream".freeze
|
|
41
|
+
|
|
40
42
|
# A handler is application code and can raise anything. Catching only
|
|
41
43
|
# StandardError let a handler raising outside that hierarchy escape and take
|
|
42
44
|
# the channel's frame dispatch with it, so the catch below is deliberately
|
|
@@ -1493,16 +1495,18 @@ module AsyncRabbitMQ
|
|
|
1493
1495
|
|
|
1494
1496
|
# Encode one basic.publish (method + header + body frames) into a single
|
|
1495
1497
|
# byte string, so a message always hits the write queue in one piece.
|
|
1496
|
-
def encode_publish(payload, exchange:, routing_key:, mandatory: false, persistent:
|
|
1497
|
-
content_type:
|
|
1498
|
+
def encode_publish(payload, exchange:, routing_key:, mandatory: false, persistent: true,
|
|
1499
|
+
content_type: DEFAULT_CONTENT_TYPE, content_encoding: nil, headers: nil, priority: 0,
|
|
1498
1500
|
correlation_id: nil, reply_to: nil, expiration: nil, message_id: nil,
|
|
1499
1501
|
timestamp: nil, type: nil, user_id: nil, app_id: nil, properties: {})
|
|
1500
1502
|
payload_bytes = payload.is_a?(String) ? payload.b : payload
|
|
1501
|
-
props = {
|
|
1502
|
-
|
|
1503
|
+
props = {
|
|
1504
|
+
delivery_mode: persistent ? 2 : 1,
|
|
1505
|
+
content_type: content_type || DEFAULT_CONTENT_TYPE,
|
|
1506
|
+
priority: priority || 0
|
|
1507
|
+
}
|
|
1503
1508
|
props[:content_encoding] = content_encoding if content_encoding
|
|
1504
1509
|
props[:headers] = headers if headers
|
|
1505
|
-
props[:priority] = priority if priority
|
|
1506
1510
|
props[:correlation_id] = correlation_id if correlation_id
|
|
1507
1511
|
props[:reply_to] = reply_to if reply_to
|
|
1508
1512
|
props[:expiration] = expiration if expiration
|
data/lib/async_rabbitmq.rb
CHANGED