Adding subscribe to shard request id logging to ShardConsumerSubscriber.

This commit is contained in:
jushkem 2020-03-23 03:53:38 -04:00
parent ab572a9378
commit adb6444815

View file

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