Skip to content

Commit

Permalink
feat: Add rate limiting flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyuLianga committed Aug 30, 2024
1 parent 7d33cba commit 9f3cbc7
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 9f3cbc7

Please sign in to comment.