Kinesis CA: Fulfill lockFuture on exception

Related to https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/issues/148

When `lock.tryLock()` ends up with an exception,
we just log it under error category.

* Add also `lockFuture.complete(false)` in the catch block
when we try to renew the lock
This commit is contained in:
Artem Bilan
2020-12-21 13:24:52 -05:00
parent ac74dfd236
commit 526353c9d8

View File

@@ -1506,6 +1506,7 @@ public class KinesisMessageDrivenChannelAdapter extends MessageProducerSupport
}
}
catch (Exception e) {
lockFuture.complete(false);
logger.error("Error during locking: " + lock, e);
}
}