-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add json field #31
Add json field #31
Conversation
@@ -7,6 +7,9 @@ const sns = new AWS.SNS({ | |||
region: process.env.AWS_SNS_REGION | |||
}); | |||
|
|||
// Amazon SNS currently allows a maximum size of 256 KB for published messages. | |||
const MAX_EVENT_MESSAGE_SIZE = 256 * 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you multiply by 1024?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's 256 kilobyte limitation, so MAX_EVENT_MESSAGE_SIZE
means the maximum bytes we can have
index.js
Outdated
@@ -115,6 +134,13 @@ function dispatch({ type, uri, id, checksum, source, message }) { | |||
throw new InvalidEventMessageError("event message is required"); | |||
} | |||
|
|||
let JsonStr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe lowercase jsonStr
because it is not a class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pick up, fixed
Records
for S3 eventsjson
field, when publish message it will be stringified, then parsed back to json when consume the messagejson
filed is too large