Skip to content

Conversation

@desty2k
Copy link
Contributor

@desty2k desty2k commented Feb 8, 2026

Summary

  • Call ISnsEnvelopeMapper.ToAttributes() for each entry in OutgoingSnsBatch, matching the single-message path in AmazonSnsTopic.SendMessageAsync()
  • Move PublishBatchRequest construction outside the per-envelope try/catch so a single mapping failure doesn't leave Request uninitialized

Tests

  • Added unit tests for OutgoingSnsBatch:
    • Batch entries include message attributes from the mapper
    • Request is always constructed even when all envelopes fail mapping
    • A single mapping failure does not block other entries from being batched

desty2k and others added 2 commits February 8, 2026 17:30
…t allocation

OutgoingSnsBatch never called ISnsEnvelopeMapper.ToAttributes() when building
PublishBatchRequestEntry objects, so message attributes (including ProtocolVersion
and any custom attributes) were silently dropped for all batched SNS publishes.
Only the inline sending path in AmazonSnsTopic.SendMessageAsync() called
ToAttributes(). Also moved the PublishBatchRequest assignment out of the foreach
loop where it was needlessly recreated on every iteration.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@jeremydmiller
Copy link
Member

@desty2k Thank you! The aws CI thing is, um, not ready for prime time. I'll be running this locally before any nuget release just in case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants