• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java GetConsumerStatusBody类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.alibaba.rocketmq.common.protocol.body.GetConsumerStatusBody的典型用法代码示例。如果您正苦于以下问题:Java GetConsumerStatusBody类的具体用法?Java GetConsumerStatusBody怎么用?Java GetConsumerStatusBody使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

GetConsumerStatusBody类属于com.alibaba.rocketmq.common.protocol.body包,在下文中一共展示了GetConsumerStatusBody类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getConsumeStatus

点赞 3

import com.alibaba.rocketmq.common.protocol.body.GetConsumerStatusBody; //导入依赖的package包/类
/**
 * 获取 consumer 消息消费状态。
 */
public RemotingCommand getConsumeStatus(ChannelHandlerContext ctx, RemotingCommand request)
        throws RemotingCommandException {
    final RemotingCommand response = RemotingCommand.createResponseCommand(null);
    final GetConsumerStatusRequestHeader requestHeader =
            (GetConsumerStatusRequestHeader) request
                .decodeCommandCustomHeader(GetConsumerStatusRequestHeader.class);

    Map<MessageQueue, Long> offsetTable =
            this.mqClientFactory.getConsumerStatus(requestHeader.getTopic(), requestHeader.getGroup());
    GetConsumerStatusBody body = new GetConsumerStatusBody();
    body.setMessageQueueTable(offsetTable);
    response.setBody(body.encode());
    response.setCode(ResponseCode.SUCCESS);
    return response;
}
 

开发者ID:diwayou,
项目名称:rocketmq-all-trans,
代码行数:19,
代码来源:ClientRemotingProcessor.java

示例2: getConsumeStatus

点赞 3

import com.alibaba.rocketmq.common.protocol.body.GetConsumerStatusBody; //导入依赖的package包/类
/**
 * 获取 consumer 消息消费状态。
 */
public RemotingCommand getConsumeStatus(ChannelHandlerContext ctx, RemotingCommand request)
        throws RemotingCommandException {
    final RemotingCommand response = RemotingCommand.createResponseCommand(null);
    final GetConsumerStatusRequestHeader requestHeader =
            (GetConsumerStatusRequestHeader) request
                .decodeCommandCustomHeader(GetConsumerStatusRequestHeader.class);

    Map<MessageQueue, Long> offsetTable =
            this.mqClientFactory.getConsumerStatus(requestHeader.getTopic(), requestHeader.getGroup());
    GetConsumerStatusBody body = new GetConsumerStatusBody();
    body.setMessageQueueTable(offsetTable);
    response.setBody(body.encode());
    response.setCode(RemotingProtos.ResponseCode.SUCCESS_VALUE);
    return response;
}
 

开发者ID:brucechan0921,
项目名称:RocketMQ-3.0.8,
代码行数:19,
代码来源:ClientRemotingProcessor.java

示例3: getConsumeStatus

点赞 2

import com.alibaba.rocketmq.common.protocol.body.GetConsumerStatusBody; //导入依赖的package包/类
@Deprecated
public RemotingCommand getConsumeStatus(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException {
    final RemotingCommand response = RemotingCommand.createResponseCommand(null);
    final GetConsumerStatusRequestHeader requestHeader =
            (GetConsumerStatusRequestHeader) request.decodeCommandCustomHeader(GetConsumerStatusRequestHeader.class);

    Map<MessageQueue, Long> offsetTable = this.mqClientFactory.getConsumerStatus(requestHeader.getTopic(), requestHeader.getGroup());
    GetConsumerStatusBody body = new GetConsumerStatusBody();
    body.setMessageQueueTable(offsetTable);
    response.setBody(body.encode());
    response.setCode(ResponseCode.SUCCESS);
    return response;
}
 

开发者ID:y123456yz,
项目名称:reading-and-annotate-rocketmq-3.4.6,
代码行数:14,
代码来源:ClientRemotingProcessor.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)