Skip to content
Permalink
Browse files
[INLONG-4217][TubeMQ] Add flow control and filtering methods to the c…
…onsumption group settings (#4230)
  • Loading branch information
bluewang committed May 17, 2022
1 parent d1ff90b commit 5db0eb8bd32efbec05a3146f5320c513377b317e
Showing 5 changed files with 85 additions and 0 deletions.
@@ -26,6 +26,8 @@
import org.apache.inlong.tubemq.manager.controller.group.request.AddBlackGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.DeleteBlackGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.DeleteOffsetReq;
import org.apache.inlong.tubemq.manager.controller.group.request.FilterCondGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.FlowControlGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.QueryOffsetReq;
import org.apache.inlong.tubemq.manager.controller.node.request.CloneOffsetReq;
import org.apache.inlong.tubemq.manager.controller.topic.request.BatchAddGroupAuthReq;
@@ -71,6 +73,10 @@ TubeMQResult groupMethodProxy(
return topicService.rebalanceGroup(gson.fromJson(req, RebalanceGroupReq.class));
case TubeConst.REBALANCE_CONSUMER:
return masterService.baseRequestMaster(gson.fromJson(req, RebalanceConsumerReq.class));
case TubeConst.FILTER_CONDITION:
return masterService.baseRequestMaster(gson.fromJson(req, FilterCondGroupReq.class));
case TubeConst.FLOW_CONTROL:
return masterService.baseRequestMaster(gson.fromJson(req, FlowControlGroupReq.class));
default:
return TubeMQResult.errorResult(TubeMQErrorConst.NO_SUCH_METHOD);
}
@@ -29,4 +29,5 @@ public class DeleteBlackGroupReq extends BaseReq {
private String topicName;
private String confModAuthToken;
private String groupName;
private String modifyUser;
}
@@ -0,0 +1,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.inlong.tubemq.manager.controller.group.request;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.inlong.tubemq.manager.controller.node.request.BaseReq;

/**
* Consumer group filter item record
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FilterCondGroupReq extends BaseReq {
private String groupName;
private String topicName;
private String confModAuthToken;
private Integer condStatus;
private String filterConds;
private String createUser;
}
@@ -0,0 +1,37 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.inlong.tubemq.manager.controller.group.request;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.inlong.tubemq.manager.controller.node.request.BaseReq;

/**
* Consumer group flow control rules
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FlowControlGroupReq extends BaseReq {
private String groupName;
private Integer statusId;
private Integer qryPriorityId;
private String confModAuthToken;
private String createUser;
}
@@ -60,6 +60,9 @@ public class TubeConst {
public static final String AUTH_CONTROL = "authControl";
public static final String ADD_TOPIC_TASK = "addTopicTask";
public static final String QUERY_CAN_WRITE = "queryCanWrite";
public static final String FILTER_CONDITION = "filterCondition";
public static final String FLOW_CONTROL = "flowControl";


/**
* status code

0 comments on commit 5db0eb8

Please sign in to comment.