You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I drafted a possible approach. This was inspired by IHttpContextAccessor. The injection idea makes it possible to access the raw SQS message, but doesn't really encourage it. Also, it avoids breaking changes to the message handler interface.
I included an SqsRecord wrapper around Amazon.Lambda.SQSEvents.SQSEvent.SQSMessage to:
Hide facts of limited use, namely, the raw non-deserialized body.
Hide facts that I'm not sure actually work when SQS is paired with Lambda, namely, custom SQS message attributes. AWS's event source implementation would have to ask the SQS ReceiveMessage API to include such attributes. Further testing could determine if these work or not.
Make AWS-defined message attributes more convenient to access (typed properties vs. Dictionary<string, string>).
Protect our library from consumers mutating the SQSMessage.
All that being said, perhaps wrapping the SQSMessage is overkill.
Let's discuss here how to give access to the raw SQS message.
This issue was spawned by #25
The text was updated successfully, but these errors were encountered: