如何解决MessageGroupId 参数对于具有 stepfunction
我有 SNS FIFO 主题,并使用步骤函数 SnsPublish 发布消息,但出现此错误
Error
SNS.InvalidParameterException
Cause
Invalid parameter: The MessageGroupId parameter is required for FIFO topics (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 2dcc9124-1a2d-5527-93f1-c8a4f27ac92a; Proxy: null)
你能帮助我如何在 CDK 中绑定 MessageGroupId 吗? 当我添加属性 messageGroupId CDK 显示类型为“{ topic: sns.Topic;”的参数消息:sfn.TaskInput; messageGroupId:字符串; }' 不可分配给类型为 'SnsPublishProps' 的参数。 我花了两天的时间,直到现在我都没有找到任何解决方案
const newBookinewBookingRequestTopicngsQueue = new sqs.Queue(this,'newBookingsQueueTestYAHYA',{
queueName: 'newBookingsQueueTest.fifo',contentBasedDeduplication: true,fifo: true
});
const sendNewBookingRequestSNSNotification = new tasks.SnsPublish(
this,'Publish alert notification',{
integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,topic: newBookinewBookingRequestTopicngsQueue,message:sfn.TaskInput.fromObject({
snsMessage: sfn.JsonPath.entirePayload,taskToken:sfn.JsonPath.taskToken
}),/* MessageGroupId : "messageGroupId1",MessageDeduplicationId: "messageDeduplicationId1" */
}
);
***'MessageGroupI' 不存在于类型 'SnsPublishProps'
'MessageDeduplicationId' 不存在于类型 'SnsPublishProps'***
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。