Repository navigation
What's Changed
Deterministic HMAC Signing Key for Receipt Handle Verification
Previously, the HMAC signing key used for receipt handle verification was generated randomly per queue instance. This meant that if the queue instance was recreated (process restart, different consumer, scaling event), the new instance could not verify receipt handles signed by the previous instance, making message acknowledgment (delete) impossible.
Changes:
- Default signing key is now deterministic — receipt handles work across queue instances out of the box without any configuration
- Added
UseSigningKey(key []byte) Queueto theQueueinterface for providing a custom secret key (recommended for production) - Added
MinSigningKeyLengthconstant (32 bytes) andErrSigningKeyTooShortsentinel error - Key validation is deferred to operation time, consistent with existing
UseTable/UseQueueName/UseClientIDpattern
Usage with custom key:
queue := dynamodbqueue.New(cfg, 0).
UseTable("my-table").
UseQueueName("my-queue").
UseClientID("consumer-1").
UseSigningKey([]byte("your-32-byte-secret-key-here!!!!"))Other
- CI badge fix
- CI test configuration improvements
Full Changelog: v0.10.2...v0.11.0