Hi I send, 1000 messages to kafka, using sync mode ( I don;t use async, because I have to get the status that all messages have reached):
`
for k,message in pairs(messages) do
local ok, err = bp:send("test", key, message)
end
it works, but wait a long time for the result
But if i use buffer and batch_send:
`
local sendbuffer = self.sendbuffer
for k, message in pairs(messages) do
sendbuffer:add(topic, partition_id, nil, message)
end
local ok = _batch_send(self, sendbuffer)
`
it works much faster and it seems to work correctly.
If this works correctly, why not make this method public?
Hi I send, 1000 messages to kafka, using sync mode ( I don;t use async, because I have to get the status that all messages have reached):
`
it works, but wait a long time for the result
But if i use buffer and batch_send:
`
` it works much faster and it seems to work correctly.
If this works correctly, why not make this method public?