sqs_extended_client 0.1.0 → 0.2.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 +19 -2
- data/README.md +13 -4
- data/lib/sqs_extended_client/configuration.rb +5 -2
- data/lib/sqs_extended_client/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: b1c58bcf0ebf9756ac0203bef44eed13755955402e15ccbce16699c54dc789ae
|
|
4
|
+
data.tar.gz: ca0a37de8e6b60546b1c3e117a7a8bd277d43f8076278822c1be2b743b13ae7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 764412c79b2044152d198628021e7636df8193b08ad3d1d9f40cdf3e5fcced59f5615eea9bd03305ad574173bcf8ff4a958c1268c8eaef7afb4f68a64ad55ff6
|
|
7
|
+
data.tar.gz: e3816f9b9acc7f2a6cdfd679868f5d6330dd1862e3003477d635dd76f9c8ce2ccca31a5e5d1443f39bbdcec70d61ec8ddffc33ab5ef5ff1191b01de493528773
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [0.2.0] - 2026-09-18
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- `payload_size_threshold` now defaults to `1_048_576` rather than `262_144`. AWS raised the
|
|
8
|
+
maximum SQS message size from 256 KiB to 1 MiB in August 2025, so the old default sent
|
|
9
|
+
payloads to S3 that the queue accepts directly. Bodies between 256 KiB and 1 MiB now go
|
|
10
|
+
inline. Pass `payload_size_threshold: 262_144` to keep the previous behaviour, which is
|
|
11
|
+
also what the AWS Java and Python clients still default to.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Corrected the 256 KB message size limit quoted throughout the README and the gem summary.
|
|
16
|
+
- Documented that `SendMessageBatch` is capped at 1 MiB in total rather than per entry, so a
|
|
17
|
+
batch of bodies that are each under the threshold can still be rejected.
|
|
18
|
+
|
|
19
|
+
## [0.1.0] - 2026-09-18
|
|
4
20
|
|
|
5
21
|
### Added
|
|
6
22
|
|
|
7
23
|
- Initial release: `SqsExtendedClient::Client`, an `Aws::SQS::Client` wrapper that offloads
|
|
8
|
-
message bodies
|
|
24
|
+
large message bodies to S3 and restores them on receive, wire compatible with the AWS SQS
|
|
25
|
+
extended client libraries for Java and Python.
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# sqs_extended_client
|
|
2
2
|
|
|
3
|
-
Send and receive Amazon SQS messages larger than the
|
|
3
|
+
Send and receive Amazon SQS messages larger than the 1 MiB limit by storing the body in S3
|
|
4
4
|
and putting a small pointer on the queue instead. It is a wrapper around `Aws::SQS::Client`,
|
|
5
5
|
so anything it does not need to touch is delegated straight through.
|
|
6
6
|
|
|
@@ -56,8 +56,11 @@ client.send_message_batch(
|
|
|
56
56
|
)
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
Mind the batch cap: SQS limits a `SendMessageBatch` to 1 MiB **in total**, the same number as
|
|
60
|
+
the per-message limit. The threshold here is per message, so ten 500 KiB bodies are each under
|
|
61
|
+
it, none are offloaded, and the batch is rejected with `BatchRequestTooLong`. When you batch
|
|
62
|
+
large payloads, set `payload_size_threshold` to roughly the batch cap divided by the number of
|
|
63
|
+
entries so they offload to pointers first.
|
|
61
64
|
|
|
62
65
|
### Polling
|
|
63
66
|
|
|
@@ -115,7 +118,7 @@ client.change_message_visibility(
|
|
|
115
118
|
| Option | Default | Meaning |
|
|
116
119
|
| --- | --- | --- |
|
|
117
120
|
| `bucket_name` | required | S3 bucket the payloads are written to. |
|
|
118
|
-
| `payload_size_threshold` | `
|
|
121
|
+
| `payload_size_threshold` | `1_048_576` | Offload once body + attributes exceed this many bytes. |
|
|
119
122
|
| `always_through_s3` | `false` | Offload every message regardless of size. |
|
|
120
123
|
| `cleanup_s3_payload` | `true` | Delete the S3 object when the message is deleted. |
|
|
121
124
|
| `ignore_payload_not_found` | `false` | On a missing S3 object, delete the SQS message and skip it instead of raising. |
|
|
@@ -154,6 +157,12 @@ Only the operations that need it are overridden: `send_message`, `send_message_b
|
|
|
154
157
|
|
|
155
158
|
## Caveats
|
|
156
159
|
|
|
160
|
+
- The default threshold follows the current SQS limit of 1 MiB, which AWS raised from 256 KiB
|
|
161
|
+
in August 2025. The AWS Java and Python extended clients still default to 262_144, so the
|
|
162
|
+
same payload may offload there and go inline here. That is a local cost decision, not a
|
|
163
|
+
compatibility one: both sides read whatever they are given. Set
|
|
164
|
+
`payload_size_threshold: 262_144` to match them, and do the same against an SQS-compatible
|
|
165
|
+
endpoint such as LocalStack or ElasticMQ that has not adopted the larger limit.
|
|
157
166
|
- SQS allows 10 message attributes and the reserved one takes a slot, so an offloaded message
|
|
158
167
|
may carry at most 9 of your own.
|
|
159
168
|
- Nothing here expires S3 objects on its own. Set a lifecycle rule on the bucket so payloads
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module SqsExtendedClient
|
|
4
4
|
class Configuration
|
|
5
|
-
# SQS caps a message at 256 KiB
|
|
6
|
-
|
|
5
|
+
# SQS caps a message at 1 MiB (raised from 256 KiB in August 2025); anything
|
|
6
|
+
# larger goes to S3. Set payload_size_threshold to 262_144 to match the AWS
|
|
7
|
+
# Java and Python extended clients, which still default to the old limit, or
|
|
8
|
+
# when the endpoint is not the real SQS.
|
|
9
|
+
DEFAULT_PAYLOAD_SIZE_THRESHOLD = 1_048_576
|
|
7
10
|
|
|
8
11
|
# SQS allows 10 message attributes and the reserved one takes a slot.
|
|
9
12
|
MAX_ALLOWED_ATTRIBUTES = 9
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sqs_extended_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ngoc Bui
|
|
@@ -85,6 +85,6 @@ requirements: []
|
|
|
85
85
|
rubygems_version: 3.4.10
|
|
86
86
|
signing_key:
|
|
87
87
|
specification_version: 4
|
|
88
|
-
summary: Send and receive SQS messages larger than
|
|
88
|
+
summary: Send and receive SQS messages larger than 1 MiB by offloading the payload
|
|
89
89
|
to S3.
|
|
90
90
|
test_files: []
|