Search in sources :

Example 6 with ConsumerSendMsgBackRequestHeader

use of org.apache.rocketmq.common.protocol.header.ConsumerSendMsgBackRequestHeader in project rocketmq by apache.

the class SendMessageProcessorTest method createSendMsgBackCommand.

private RemotingCommand createSendMsgBackCommand(int requestCode) {
    ConsumerSendMsgBackRequestHeader requestHeader = new ConsumerSendMsgBackRequestHeader();
    requestHeader.setMaxReconsumeTimes(3);
    requestHeader.setDelayLevel(4);
    requestHeader.setGroup(group);
    requestHeader.setOffset(123L);
    RemotingCommand request = RemotingCommand.createRequestCommand(requestCode, requestHeader);
    request.makeCustomHeaderToNet();
    return request;
}
Also used : RemotingCommand(org.apache.rocketmq.remoting.protocol.RemotingCommand) ConsumerSendMsgBackRequestHeader(org.apache.rocketmq.common.protocol.header.ConsumerSendMsgBackRequestHeader)

Aggregations

ConsumerSendMsgBackRequestHeader (org.apache.rocketmq.common.protocol.header.ConsumerSendMsgBackRequestHeader)6 RemotingCommand (org.apache.rocketmq.remoting.protocol.RemotingCommand)6 ConsumeMessageContext (org.apache.rocketmq.broker.mqtrace.ConsumeMessageContext)2 MQBrokerException (org.apache.rocketmq.client.exception.MQBrokerException)2 TopicConfig (org.apache.rocketmq.common.TopicConfig)2 MessageExt (org.apache.rocketmq.common.message.MessageExt)2 SubscriptionGroupConfig (org.apache.rocketmq.common.subscription.SubscriptionGroupConfig)2 MessageExtBrokerInner (org.apache.rocketmq.store.MessageExtBrokerInner)2 PutMessageResult (org.apache.rocketmq.store.PutMessageResult)2