Amazon SQS 不向我的工作程序实例提供完整消息
Amazon SQS doesn't supply my worker instance with the full message
我正在尝试使用 SQS 排队和处理请求。我在 elastic beanstalk 上使用 Node.JS worker 设置它,当消息从另一个盒子添加到它时,它会自动从 SQS 获取 http posts。
问题是,我无法从 http post 获取所有必要的数据以从队列中删除消息。我看到的唯一数据是我自己在正文中输入的消息数据,但没有 MessageId 或 ReceiptHandle。
我可以在手动调用 SQS.receiveMessage(queuerurl,callback) 时获得这些属性,但前提是我没有自动设置 http posting。
当我将 SQS post 发送给我的工作人员时,消息立即进入队列,然后进入一个不可见的 'in flight' 状态,使用 SQS.receiveMessage( queuerurl,回调)。
谁能解释一下我在这里遗漏了什么?
我是否误解了 SQS 提供的 'automatic message send'?
感谢帮助
Elastic Beanstalk 工作人员有一项服务可以从 SQS 中提取消息并通过 HTTP 将这些消息提交给您的代码。 SQS 本身在这里没有做任何特别的事情。 beantalk worker 上的服务管理消息的轮询 SQS 并在处理完这些消息后将其删除。
When the application in the worker environment returns a 200 OK
response to acknowledge that it has received and successfully
processed the request, the daemon sends a DeleteMessage call to the
SQS queue so that the message will be deleted from the queue.
我正在尝试使用 SQS 排队和处理请求。我在 elastic beanstalk 上使用 Node.JS worker 设置它,当消息从另一个盒子添加到它时,它会自动从 SQS 获取 http posts。
问题是,我无法从 http post 获取所有必要的数据以从队列中删除消息。我看到的唯一数据是我自己在正文中输入的消息数据,但没有 MessageId 或 ReceiptHandle。
我可以在手动调用 SQS.receiveMessage(queuerurl,callback) 时获得这些属性,但前提是我没有自动设置 http posting。
当我将 SQS post 发送给我的工作人员时,消息立即进入队列,然后进入一个不可见的 'in flight' 状态,使用 SQS.receiveMessage( queuerurl,回调)。
谁能解释一下我在这里遗漏了什么?
我是否误解了 SQS 提供的 'automatic message send'?
感谢帮助
Elastic Beanstalk 工作人员有一项服务可以从 SQS 中提取消息并通过 HTTP 将这些消息提交给您的代码。 SQS 本身在这里没有做任何特别的事情。 beantalk worker 上的服务管理消息的轮询 SQS 并在处理完这些消息后将其删除。
When the application in the worker environment returns a 200 OK response to acknowledge that it has received and successfully processed the request, the daemon sends a DeleteMessage call to the SQS queue so that the message will be deleted from the queue.