Skip to content

Commit

Permalink
sqs invisibleTime
Browse files Browse the repository at this point in the history
  • Loading branch information
yuz10 authored Jul 6, 2024
1 parent 25f5e2d commit 12935dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/resty/rocketmq/server/sqs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,11 @@ end
function _M:receiveMessage(request)
local wait_seconds = request.WaitTimeSeconds or 5
local num = request.MaxNumberOfMessages or 1
local invisibleTime = request.VisibilityTimeout or 60
local topic = request.QueueUrl
local group = "GID_SQS"
local popResult, err = self.p.client:pop({ brokerName = 'broker-0', topic = topic, queueId = -1 }, 60000, num, group,
wait_seconds * 1000, true, client.INIT_MODE_MIN, nil, "*")
local popResult, err = self.p.client:pop({ brokerName = 'broker-0', topic = topic, queueId = -1 },
invisibleTime * 1000, num, group, wait_seconds * 1000, true, client.INIT_MODE_MIN, nil, "*")
if not popResult then
error(500, tostring(err))
end
Expand Down

0 comments on commit 12935dd

Please sign in to comment.