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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acf485922e3e284c6d637b9047d44e521402e466f43e9cc7158cd7e880653559
4
- data.tar.gz: 887b7316e17d2d0dce494cb4f9663dc341361a02cc89b621e7f1855bc2af9568
3
+ metadata.gz: 12f881a8b2274539cd1e93e8ea827140887f0a392952dcd123270acaf5d4aea3
4
+ data.tar.gz: 94ad7522a6b7c33d5cde8b892c0629b5db4961b9eb289c4efc6ab6c3f7286c66
5
5
  SHA512:
6
- metadata.gz: 2c5fe4cebf5dddc0dfb80a00fafb96e83be3578cb08f8b2f969599ace41dc644b46a1a05abdd878ad0bf8746182724d124a5ab83d4aabedd556f149dfb7ff741
7
- data.tar.gz: 7b04b91fa3fffff2fc863a151bc4346e57b7e976ba2cffd3f0242dfd576e0c1f5467f036878acfec875c005ee43a582ed183fd9c28fa9a3d385cb3ab722ee9fb
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: false,
1497
- content_type: nil, content_encoding: nil, headers: nil, priority: nil,
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 = { delivery_mode: persistent ? 2 : 1 }
1502
- props[:content_type] = content_type if content_type
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
@@ -1,3 +1,3 @@
1
1
  module AsyncRabbitMQ
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -32,5 +32,7 @@ require_relative "async_rabbitmq/session"
32
32
  require_relative "async_rabbitmq/cluster"
33
33
 
34
34
  module AsyncRabbitMQ
35
+ DEFAULT_CONTENT_TYPE = Channel::DEFAULT_CONTENT_TYPE
36
+
35
37
  # Optional: require "async_rabbitmq/pool" for connection pooling.
36
38
  end
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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Penney