Closed gemelen closed 7 years ago
@gemelen Thanks you very much :) And really sorry for the delay on my side :<
I think the deepcopy
for every sendbuffer
may bring performance problem even when no success_handler
:)
May be you can simply call the success_handler
in _send
, and we can get more useful information there, like offset
:)
https://github.com/doujiang24/lua-resty-kafka/blob/master/lib/resty/kafka/producer.lua#L154
Thanks for reply and for your suggestions regarding this code improvement. Idea to avoid additional buffer is great, even if we already do not see much impact from this chage in production. I'll add implementation in short time
Changelist is updated, suggestions on change applied.
Goal of proposed change:
ability to control successful sending to Kafka, which is vital for monitoring of complex pipelines. E.g. metric reporting placed in error and success handles to log number of published and failed messages to monitoring or logging facility.
What was changed: