Adding MessageGroupId and MessageDeduplicationId (#3163)

Adding MessageGroupId and MessageDeduplicationId when sent from batch (#3101)
This commit is contained in:
ryanlchandler 2020-07-22 08:09:12 -04:00 committed by GitHub
commit bf8eb11dc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 0 deletions

View file

@ -1044,6 +1044,8 @@ def test_send_message_batch():
"DataType": "String",
}
},
"MessageGroupId": "message_group_id_1",
"MessageDeduplicationId": "message_deduplication_id_1",
},
{
"Id": "id_2",
@ -1052,6 +1054,8 @@ def test_send_message_batch():
"MessageAttributes": {
"attribute_name_2": {"StringValue": "123", "DataType": "Number"}
},
"MessageGroupId": "message_group_id_2",
"MessageDeduplicationId": "message_deduplication_id_2",
},
],
)
@ -1066,10 +1070,22 @@ def test_send_message_batch():
response["Messages"][0]["MessageAttributes"].should.equal(
{"attribute_name_1": {"StringValue": "attribute_value_1", "DataType": "String"}}
)
response["Messages"][0]["Attributes"]["MessageGroupId"].should.equal(
"message_group_id_1"
)
response["Messages"][0]["Attributes"]["MessageDeduplicationId"].should.equal(
"message_deduplication_id_1"
)
response["Messages"][1]["Body"].should.equal("body_2")
response["Messages"][1]["MessageAttributes"].should.equal(
{"attribute_name_2": {"StringValue": "123", "DataType": "Number"}}
)
response["Messages"][1]["Attributes"]["MessageGroupId"].should.equal(
"message_group_id_2"
)
response["Messages"][1]["Attributes"]["MessageDeduplicationId"].should.equal(
"message_deduplication_id_2"
)
@mock_sqs