code: protected boolean isDiscarded(long batchId) {
          if (batchId == TransactionCommon.INIT_BATCH_ID) {
              return false;
          } else if (!boltStatus.equals(State.ACTIVE)) {
              LOG.debug("Bolt is not active, state={}, tuple is going to be discarded", boltStatus.toString());
              return true;
          } else if (batchId <= lastSuccessfulBatch) {
              LOG.info("Received expired event of batch-{}, current batchId={}", batchId, lastSuccessfulBatch);
              return true;
          } else {
              return false;
          }
      }
docs: Check if the incoming batch would be discarded.
  Generally, the incoming batch shall be discarded while bolt is under rollback, or it is expired.
  @param batchId
  @return