@Override
    public void handle(Throwable ex) {
        LOGGER.error("Encounter storage fail, try force to close the streams", ex);
        this.streamClient.forceClose();
        LOGGER.info("Complete force to close the streams");
    }
Force to upload all data in memory to S3 and close the streams.
s3stream/src/main/java/com/automq/stream/s3/failover/ForceCloseStorageFailureHandler.java