awslabs / amazon-kinesis-agent

Continuously monitors a set of log files and sends new data to the Amazon Kinesis Stream and Amazon Kinesis Firehose in near-real-time.
Other
352 stars 218 forks source link

maxBufferAgeMillis does work independently #253

Open hubertli opened 1 year ago

hubertli commented 1 year ago

According to AWS supporter response: " if any data has been in the buffer for more than the time specified in "maxbufferagemillis," it will be delivered regardless of value configured for size or number of records for the buffer."

but my test shows different behavior. Kinesis agent version: 2.0.6

I set maxBufferAgeMillis to 600000 for different logs, e.g. /var/log/A.log and /var/log/B.log. Then I can see log A is ingested to the data stream and counterpart S3 bucket in every 10 minutes, but it's 20 minutes for log B. The configurations(Kinesis agent, data streams and S3) are same for both A and B, the only difference is that B has only one record in the log file, but A has many.

So I changed agent.json with the configuration below: "maxBufferAgeMillis": 600000, "maxBufferSizeBytes": 1, "maxBufferSizeRecords": 1

Then I can see the log B is ingested to there in every 10 minutes. So maxbufferagemillis does work independently.