Skip to content
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

Support Raw Message Delivery #5

Merged
merged 12 commits into from
Nov 21, 2023
Merged

Conversation

jameskbride
Copy link
Owner

Context

Addresses #4. http(s) and sqs should support subscriptions with the RawMessageDelivery attribute set to "true", allowing the message paylod to be delivered without the SNS metadata wrapping it. This also fixes Slack to always send the raw message as it doesn't support the SNS Message format.

Changes

  • Slack always publishes the raw message.
  • It can publish raw messages to sqs.
  • Can publish to http with raw message delivery.
  • https handles raw message delivery.
  • It can publish raw http messages with MessageStructure.
  • It can publish raw sqs messages with MessageStructure.
  • Adding a docker pull badge to the README.

Testing and Validation Steps

HTTP(S)

  1. Create a subscription with an http endpoint and the RawMessageDelivery attribute.
  2. Publish a message to the subscription topic.
  3. Validate that the message is received by the endpoint with the SNS metadata included.
  4. Add the RawMessageDelivery attribute via SetSubscriptionAttribute.
  5. Publish a message to the topic.
  6. Validate that the raw message payload is delivered without the SNS metadata.
  7. Publish a message using the MessageStructure attribute (set to json) with an entry in the payload for http.
  8. Validate that the raw message payload is delivered without the SNS metadata.

SQS

1.Create a new SQS queue.
2. Create a subscription with the sqs endpoint and the RawMessageDelivery attribute.
3. Publish a message to the subscription topic.
4. Validate that the message is received by the endpoint with the SNS metadata included.
5. Add the RawMessageDelivery attribute via SetSubscriptionAttribute.
6. Publish a message to the topic.
7. Validate that the raw message payload is delivered without the SNS metadata.
8. Publish a message using the MessageStructure attribute (set to json) with an entry in the payload for sqs.
9. Validate that the raw message payload is delivered without the SNS metadata.

Slack

  1. Create a subscription with a slack endpoint without the RawMessageDelivery attribute.
  2. Publish a message to the subscription topic.
  3. Validate that the raw message is received by Slack.

@jameskbride jameskbride merged commit 89e0145 into main Nov 21, 2023
1 check passed
@jameskbride jameskbride deleted the support-raw-message-delivery branch November 21, 2023 01:00
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.

1 participant