参数MessedUplicationID的值无效。原因:请求包括一个对此队列类型无效的参数

发布于 2025-02-10 22:10:52 字数 280 浏览 1 评论 0原文

我在通过Localstack本地运行的SQS中有一个队列。我已经配置了.env与我的索引器和API交谈。但是当我运行时,它给了我这一消息:

Value I4nCE8HRz0M for parameter MessageDeduplicationId is 
invalid. Reason: The request includes a parameter that is 
not valid for this queue type.

由于LocalStack正常运行,我有点困惑

I have a queue in SQS running locally via Localstack. I already configured my .env to talk to my indexer and my api. But when I run it gives me this message:

Value I4nCE8HRz0M for parameter MessageDeduplicationId is 
invalid. Reason: The request includes a parameter that is 
not valid for this queue type.

I'm a bit confused as to what it could be since Localstack is running normally

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夏至、离别 2025-02-17 22:10:52

出现问题是因为您正在尝试将消息发送到FIFO队列,但是您已经创建了一个标准队列。而不是运行命令:

LOCAL_STACK_CONTAINER.execInContainer("awslocal", "sqs", "create-queue", "--queue-name", QUEUE_NAME);

您应该运行此:

LOCAL_STACK_CONTAINER.execInContainer("awslocal", "sqs", "create-queue", "--queue-name", QUEUE_NAME, "--attributes", "{\"FifoQueue\":\"true\"}");

Problem occurs because you're trying to send message to a FIFO queue, but you've created a standard queue. Instead of running command:

LOCAL_STACK_CONTAINER.execInContainer("awslocal", "sqs", "create-queue", "--queue-name", QUEUE_NAME);

You should run this one:

LOCAL_STACK_CONTAINER.execInContainer("awslocal", "sqs", "create-queue", "--queue-name", QUEUE_NAME, "--attributes", "{\"FifoQueue\":\"true\"}");
旧街凉风 2025-02-17 22:10:52

就我而言,我也会遇到这个错误。我之所以因为发送到普通队列的消息带有DewuplicationID标头。普通队列不喜欢那个标头

in my case i also got that error. and i was because the message sent to the normal queue had the deduplicationId header. normal queue does not like that header

梦里南柯 2025-02-17 22:10:52

如果仅将FIFO属性(例如MessedUplicationID)发送到标准队列,则将收到此错误。这意味着您的队列类型是错误的,或者您需要删除属性。

You will receive this error if you are sending FIFO only attributes (such as MessageDeduplicationId) to a Standard Queue. This means either your queue type is wrong, or you need to remove the attributes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文