private void onFailed(Result result) {
        if (isRetryable(result.getReservedAttempts())) {
            tx.rollback();
            tx.close();
        } else {
            event.ack();
            tx.commit();
            tx.close();
            LOG.error(result.toString());
            context.addSendResultMetric(event, topicId, false, System.currentTimeMillis());
        }
    }
If send failed.

@param result Send result.
inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/cls/ClsCallback.java