public void postProcessOlderObjectIfNeeded(AmazonS3Source.S3Offset s3Offset) {
    // If sdc was shutdown after reading an object but before post processing it, handle it now.

    // The scenario is detected as follows:
    //  1. the current key must not be null
    //  2. offset must be -1
    //  3. An object with same key must exist in s3
    //  4. The timestamp of the object ins3 must be same as that of the timestamp in offset [It is
    // possible that one
    //    uploads another object with the same name. We can avoid post processing it without
    // producing records by
    //    comparing the timestamp on that object

    if (s3Offset.getKey() != null && "-1".equals(s3Offset.getOffset())) {
      // conditions 1, 2 are met. Check for 3 and 4.
      S3ObjectSummary objectSummary =
          AmazonS3Util.getObjectSummary(s3Client, s3ConfigBean.s3Config.bucket, s3Offset.getKey());
      if (objectSummary != null
          && objectSummary
                  .getLastModified()
                  .compareTo(new Date(Long.parseLong(s3Offset.getTimestamp())))
              == 0) {
        postProcessOrErrorHandle(
            s3Offset.getKey(),
            s3ConfigBean.postProcessingConfig.postProcessing,
            s3ConfigBean.postProcessingConfig.postProcessBucket,
            s3ConfigBean.postProcessingConfig.postProcessPrefix,
            s3ConfigBean.postProcessingConfig.archivingOption);
      }
    }
    currentObject = null;
  }