use of org.apache.rocketmq.common.protocol.header.DeleteSubscriptionGroupRequestHeader in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.
the class MQClientAPIImpl method deleteSubscriptionGroup.
public void deleteSubscriptionGroup(final String addr, final String groupName, final long timeoutMillis) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
DeleteSubscriptionGroupRequestHeader requestHeader = new DeleteSubscriptionGroupRequestHeader();
requestHeader.setGroupName(groupName);
RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_SUBSCRIPTIONGROUP, requestHeader);
RemotingCommand response = this.remotingClient.invokeSync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis);
assert response != null;
switch(response.getCode()) {
case ResponseCode.SUCCESS:
{
return;
}
default:
break;
}
throw new MQClientException(response.getCode(), response.getRemark());
}
use of org.apache.rocketmq.common.protocol.header.DeleteSubscriptionGroupRequestHeader in project rocketmq by apache.
the class MQClientAPIImpl method deleteSubscriptionGroup.
public void deleteSubscriptionGroup(final String addr, final String groupName, final long timeoutMillis) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
DeleteSubscriptionGroupRequestHeader requestHeader = new DeleteSubscriptionGroupRequestHeader();
requestHeader.setGroupName(groupName);
RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_SUBSCRIPTIONGROUP, requestHeader);
RemotingCommand response = this.remotingClient.invokeSync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis);
assert response != null;
switch(response.getCode()) {
case ResponseCode.SUCCESS:
{
return;
}
default:
break;
}
throw new MQClientException(response.getCode(), response.getRemark());
}
use of org.apache.rocketmq.common.protocol.header.DeleteSubscriptionGroupRequestHeader in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.
the class AdminBrokerProcessor method deleteSubscriptionGroup.
private RemotingCommand deleteSubscriptionGroup(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException {
final RemotingCommand response = RemotingCommand.createResponseCommand(null);
DeleteSubscriptionGroupRequestHeader requestHeader = (DeleteSubscriptionGroupRequestHeader) request.decodeCommandCustomHeader(DeleteSubscriptionGroupRequestHeader.class);
log.info("deleteSubscriptionGroup called by {}", RemotingHelper.parseChannelRemoteAddr(ctx.channel()));
this.brokerController.getSubscriptionGroupManager().deleteSubscriptionGroupConfig(requestHeader.getGroupName());
response.setCode(ResponseCode.SUCCESS);
response.setRemark(null);
return response;
}
use of org.apache.rocketmq.common.protocol.header.DeleteSubscriptionGroupRequestHeader in project rocketmq by apache.
the class AdminBrokerProcessor method deleteSubscriptionGroup.
private RemotingCommand deleteSubscriptionGroup(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException {
final RemotingCommand response = RemotingCommand.createResponseCommand(null);
DeleteSubscriptionGroupRequestHeader requestHeader = (DeleteSubscriptionGroupRequestHeader) request.decodeCommandCustomHeader(DeleteSubscriptionGroupRequestHeader.class);
log.info("deleteSubscriptionGroup called by {}", RemotingHelper.parseChannelRemoteAddr(ctx.channel()));
this.brokerController.getSubscriptionGroupManager().deleteSubscriptionGroupConfig(requestHeader.getGroupName());
response.setCode(ResponseCode.SUCCESS);
response.setRemark(null);
return response;
}
Aggregations