Java Code Examples for org.apache.rocketmq.broker.mqtrace.ConsumeMessageContext#setConsumerGroup()

The following examples show how to use org.apache.rocketmq.broker.mqtrace.ConsumeMessageContext#setConsumerGroup() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SendMessageProcessor.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
static private ConsumeMessageContext buildConsumeMessageContext(String namespace,
                                                                ConsumerSendMsgBackRequestHeader requestHeader,
                                                                RemotingCommand request) {
    ConsumeMessageContext context = new ConsumeMessageContext();
    context.setNamespace(namespace);
    context.setConsumerGroup(requestHeader.getGroup());
    context.setTopic(requestHeader.getOriginTopic());
    context.setCommercialRcvStats(BrokerStatsManager.StatsType.SEND_BACK);
    context.setCommercialRcvTimes(1);
    context.setCommercialOwner(request.getExtFields().get(BrokerStatsManager.COMMERCIAL_OWNER));
    return context;
}