Skip to content

Commit

Permalink
Remove Kinesis producer's internal TTL by default
Browse files Browse the repository at this point in the history
  • Loading branch information
msg555 committed Jan 3, 2025
1 parent ba57945 commit b98b036
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kinesis-producer-library.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RecordMaxBufferedTime = 100
# Default: 30000
# Minimum: 100
# Maximum (inclusive): 9223372036854775807
RecordTtl = 30000
RecordTtl = 3600000

# Which region to send records to.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ public MaxwellKinesisProducer(MaxwellContext context, String kinesisStream) {
KinesisProducerConfiguration config = KinesisProducerConfiguration.fromPropertiesFile(path.toString());
this.kinesisProducer = new KinesisProducer(config);
} else {
this.kinesisProducer = new KinesisProducer();
// The default 30 second record Ttl is too aggressive and prevents our own back-pressure
// logic from backing as needed off before the producer fails. Setting it to 1 hour
// instead.
KinesisProducerConfiguration config = new KinesisProducerConfiguration();
config.setRecordTtl(3600000);
this.kinesisProducer = new KinesisProducer(config);
}
}

Expand Down

0 comments on commit b98b036

Please sign in to comment.