public static ConsumeStatus forCode(int code) {
        for (ConsumeStatus status : values()) {
            if (status.getCode() == code) {
                return status;
            }
        }
        throw new BusinessException(String.format("Illegal code=%s for ConsumeStatus", code));
    }
Get the ConsumeStatus instance from the given code

@param code status code
@return instance of ConsumeStatus
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/ConsumeStatus.java