add control message to data message

This commit is contained in:
chrislu
2024-03-31 16:35:46 -07:00
parent 546ae87c39
commit 66a878af39
5 changed files with 502 additions and 427 deletions

View File

@@ -195,7 +195,7 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro
publishCounter := 0
for data, hasData := job.inputQueue.Dequeue(); hasData; data, hasData = job.inputQueue.Dequeue() {
if data.IsClose {
if data.Ctrl != nil && data.Ctrl.IsClose {
// need to set this before sending to brokers, to avoid timing issue
atomic.StoreInt32(&hasMoreData, 0)
}