@Override
    public void collect(T t) {
        try {
            callback.accept(t);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
A collector supporting callback. It also hides the exception thrown in method declaration to make lambda expression
shorter.
inlong-sort/sort-formats/format-common/src/main/java/org/apache/inlong/sort/formats/inlongmsg/CallbackCollector.java