This commit is contained in:
fommil 2025-05-11 07:56:10 +02:00 committed by GitHub
commit 338edba263
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ public class DiagnosticUtils {
String resourceIdentifier, Instant enqueueTimestamp, Logger log) {
final long durationBetweenEnqueueAndAckInMillis =
Duration.between(enqueueTimestamp, Instant.now()).toMillis();
if (durationBetweenEnqueueAndAckInMillis > MAX_TIME_BETWEEN_REQUEST_RESPONSE / 3) {
if (durationBetweenEnqueueAndAckInMillis > 11000) {
// The above condition logs the warn msg if the delivery time exceeds 11 seconds.
log.warn(
"{}: Record delivery time to shard consumer is high at {} millis. Check the ExecutorStateEvent logs"

View file

@ -47,7 +47,7 @@ import software.amazon.kinesis.retrieval.RecordsPublisher;
@KinesisClientInternalApi
public class ShardConsumer {
public static final int MAX_TIME_BETWEEN_REQUEST_RESPONSE = 60 * 1000;
public static final int MAX_TIME_BETWEEN_REQUEST_RESPONSE = Integer.parseInt(System.getProperty("software.amazon.kinesis.lifecycle.ShardConsumer.max_time", "60000"));
private final RecordsPublisher recordsPublisher;
private final ExecutorService executorService;
private final ShardInfo shardInfo;