Skip to content

Commit

Permalink
feat: Add rate limiting flag. (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyuLianga authored Aug 30, 2024
1 parent 7d33cba commit 452a183
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions logs/sender/batch_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func (s *batchStrategy) processMessage(m *message.Message, outputChan chan *mess
}
added := s.buffer.AddMessage(m)
if !added || s.buffer.IsFull() {
if s.buffer.IsFull() {
log.Printf("I! buffer full len: %d, size: %d",
len(s.buffer.messageBuffer), s.buffer.contentSize)
}
s.flushBuffer(outputChan, send)
}
if !added {
Expand Down

0 comments on commit 452a183

Please sign in to comment.