Skip to content

Commit

Permalink
fix error when topic writable queue num is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
yuz10 authored Apr 11, 2024
1 parent d62d220 commit b76e77e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/resty/rocketmq/producer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ local function produce(self, msg, mqSelector)
if not topicPublishInfo then
return nil, err
end
if #topicPublishInfo.messageQueueList == 0 then
return nil, 'writable queue num is zero'
end
local mqSelected
if mqSelector == nil then
mqSelected = selectOneMessageQueue(topicPublishInfo)
Expand Down

0 comments on commit b76e77e

Please sign in to comment.