Merge pull request #1654 from Birne94/sns-raw-message-delivery
Add RawMessageDelivery for SNS subscriptions (fixes #1571)
This commit is contained in:
commit
b6909ff64c
2 changed files with 27 additions and 1 deletions
|
|
@ -94,7 +94,10 @@ class Subscription(BaseModel):
|
|||
if self.protocol == 'sqs':
|
||||
queue_name = self.endpoint.split(":")[-1]
|
||||
region = self.endpoint.split(":")[3]
|
||||
enveloped_message = json.dumps(self.get_post_data(message, message_id, subject, message_attributes=message_attributes), sort_keys=True, indent=2, separators=(',', ': '))
|
||||
if self.attributes.get('RawMessageDelivery') != 'true':
|
||||
enveloped_message = json.dumps(self.get_post_data(message, message_id, subject, message_attributes=message_attributes), sort_keys=True, indent=2, separators=(',', ': '))
|
||||
else:
|
||||
enveloped_message = message
|
||||
sqs_backends[region].send_message(queue_name, enveloped_message)
|
||||
elif self.protocol in ['http', 'https']:
|
||||
post_data = self.get_post_data(message, message_id, subject)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue