Adding MessageGroupId and MessageDeduplicationId (#3163)
Adding MessageGroupId and MessageDeduplicationId when sent from batch (#3101)
This commit is contained in:
parent
b09c8034e6
commit
bf8eb11dc3
3 changed files with 28 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue