Skip to content

Commit

Permalink
Added debug log if ordering key not string
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasu7052 committed Nov 13, 2024
1 parent e396c1f commit 304d3ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/resty/pubsub/producer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ function _M.send(self, message, attributes, ordering_key)
attributes = attributes
}

if type(ordering_key) == "string" then
body_message['ordering_key'] = ordering_key

if ordering_key ~= nil then
if type(ordering_key) == "string" then
body_message['ordering_key'] = ordering_key
else
ngx.log(ngx.DEBUG, "Ordering key must be String hence dropping it ", ordering_key)
end
end

if self.ring_buffer == nil then
Expand Down

0 comments on commit 304d3ee

Please sign in to comment.