Adding subscribe to shard request id logging to ShardConsumerSubscriber. (#705)

This commit is contained in:
Joshua Kim 2020-03-23 09:34:26 -07:00 committed by GitHub
parent 763d506e20
commit 7c7491c30d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,8 +192,8 @@ class ShardConsumerSubscriber implements Subscriber<RecordsRetrieved> {
protected void logOnErrorWarning(Throwable t) {
log.warn(
"{}: onError(). Cancelling subscription, and marking self as failed. KCL will "
+ "recreate the subscription as neccessary to continue processing.",
shardConsumer.shardInfo().shardId(), t);
+ "recreate the subscription as neccessary to continue processing. Last successful request details -- {}",
shardConsumer.shardInfo().shardId(), recordsPublisher.getLastSuccessfulRequestDetails(), t);
}
protected void logOnErrorReadTimeoutWarning(Throwable t) {
@ -202,7 +202,8 @@ class ShardConsumerSubscriber implements Subscriber<RecordsRetrieved> {
+ "are seeing this warning frequently consider increasing the SDK timeouts "
+ "by providing an OverrideConfiguration to the kinesis client. Alternatively you"
+ "can configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppress"
+ "intermittant ReadTimeout warnings.", shardConsumer.shardInfo().shardId(), t);
+ "intermittant ReadTimeout warnings. Last successful request details -- {}",
shardConsumer.shardInfo().shardId(), recordsPublisher.getLastSuccessfulRequestDetails(), t);
}
@Override