Skip to content

MessageAttributes parsing from SNS #93

@AlexanderKudryavsky

Description

@AlexanderKudryavsky

Expected Behavior

If I receive messages with the correct attributes (__ SQS_S3__, SQS_GZIP) and with unwrapSns: true then it should parse my message back to its original form.

Current Behavior

If I receive a message in the form gzip or s3 then the message is not parsed properly.

Possible Solution

Incorrect path in the constructor of the class Message, must be added to if (opts.unwrapSns) - this.attributes = attributeUtils_1.parseMessageAttributes(unwrapped.MessageAttributes);
And in parseAttributeValue replace with this

const type = unparsedAttribute.DataType || unparsedAttribute.Type;
const stringValue = unparsedAttribute.StringValue || unparsedAttribute.Value;

Your Environment

  • Version used: 4.1.1
  • Node version: 10.19.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions