Search in sources :

Example 1 with InlongGroupMqExtBase

use of org.apache.inlong.manager.common.pojo.group.InlongGroupMqExtBase in project incubator-inlong by apache.

the class InlongGroupTransfer method parseMqBaseConf.

public static MqBaseConf parseMqBaseConf(InlongGroupResponse inlongGroupResponse) {
    InlongGroupMqExtBase mqExtBase = inlongGroupResponse.getMqExtInfo();
    if (null == mqExtBase || StringUtils.isBlank(mqExtBase.getMiddlewareType())) {
        return null;
    }
    String middleWare = mqExtBase.getMiddlewareType();
    MqType mqType = MqType.forType(middleWare);
    switch(mqType) {
        case NONE:
            return MqBaseConf.BLANK_MQ_CONF;
        case PULSAR:
        case TDMQ_PULSAR:
            return parsePulsarConf(inlongGroupResponse);
        case TUBE:
            return parseTubeConf(inlongGroupResponse);
        default:
            throw new RuntimeException(String.format("Illegal mqType=%s for Inlong", mqType));
    }
}
Also used : MqType(org.apache.inlong.manager.common.enums.MqType) InlongGroupMqExtBase(org.apache.inlong.manager.common.pojo.group.InlongGroupMqExtBase)

Aggregations

MqType (org.apache.inlong.manager.common.enums.MqType)1 InlongGroupMqExtBase (org.apache.inlong.manager.common.pojo.group.InlongGroupMqExtBase)1