本文整理匯總了Java中org.apache.rocketmq.remoting.protocol.RemotingCommand.makeCustomHeaderToNet方法的典型用法代碼示例。如果您正苦於以下問題:Java RemotingCommand.makeCustomHeaderToNet方法的具體用法?Java RemotingCommand.makeCustomHeaderToNet怎麽用?Java RemotingCommand.makeCustomHeaderToNet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.rocketmq.remoting.protocol.RemotingCommand
的用法示例。
在下文中一共展示了RemotingCommand.makeCustomHeaderToNet方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSendMsgCommand
import org.apache.rocketmq.remoting.protocol.RemotingCommand; //導入方法依賴的package包/類
private RemotingCommand createSendMsgCommand(int requestCode) {
SendMessageRequestHeader requestHeader = new SendMessageRequestHeader();
requestHeader.setProducerGroup(group);
requestHeader.setTopic(topic);
requestHeader.setDefaultTopic(MixAll.DEFAULT_TOPIC);
requestHeader.setDefaultTopicQueueNums(3);
requestHeader.setQueueId(1);
requestHeader.setSysFlag(0);
requestHeader.setBornTimestamp(System.currentTimeMillis());
requestHeader.setFlag(124);
requestHeader.setReconsumeTimes(0);
RemotingCommand request = RemotingCommand.createRequestCommand(requestCode, requestHeader);
request.setBody(new byte[] {'a'});
request.makeCustomHeaderToNet();
return request;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:18,代碼來源:SendMessageProcessorTest.java
示例2: createSendMsgBackCommand
import org.apache.rocketmq.remoting.protocol.RemotingCommand; //導入方法依賴的package包/類
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;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:13,代碼來源:SendMessageProcessorTest.java
示例3: createPullMsgCommand
import org.apache.rocketmq.remoting.protocol.RemotingCommand; //導入方法依賴的package包/類
private RemotingCommand createPullMsgCommand(int requestCode) {
PullMessageRequestHeader requestHeader = new PullMessageRequestHeader();
requestHeader.setCommitOffset(123L);
requestHeader.setConsumerGroup(group);
requestHeader.setMaxMsgNums(100);
requestHeader.setQueueId(1);
requestHeader.setQueueOffset(456L);
requestHeader.setSubscription("*");
requestHeader.setTopic(topic);
requestHeader.setSysFlag(0);
requestHeader.setSubVersion(100L);
RemotingCommand request = RemotingCommand.createRequestCommand(requestCode, requestHeader);
request.makeCustomHeaderToNet();
return request;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:16,代碼來源:PullMessageProcessorTest.java
示例4: createUnRegisterProducerCommand
import org.apache.rocketmq.remoting.protocol.RemotingCommand; //導入方法依賴的package包/類
private RemotingCommand createUnRegisterProducerCommand() {
UnregisterClientRequestHeader requestHeader = new UnregisterClientRequestHeader();
requestHeader.setClientID(clientId);
requestHeader.setProducerGroup(group);
RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.UNREGISTER_CLIENT, requestHeader);
request.setLanguage(LanguageCode.JAVA);
request.setVersion(100);
request.makeCustomHeaderToNet();
return request;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:11,代碼來源:ClientManageProcessorTest.java
示例5: createUnRegisterConsumerCommand
import org.apache.rocketmq.remoting.protocol.RemotingCommand; //導入方法依賴的package包/類
private RemotingCommand createUnRegisterConsumerCommand() {
UnregisterClientRequestHeader requestHeader = new UnregisterClientRequestHeader();
requestHeader.setClientID(clientId);
requestHeader.setConsumerGroup(group);
RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.UNREGISTER_CLIENT, requestHeader);
request.setLanguage(LanguageCode.JAVA);
request.setVersion(100);
request.makeCustomHeaderToNet();
return request;
}
開發者ID:lirenzuo,項目名稱:rocketmq-rocketmq-all-4.1.0-incubating,代碼行數:11,代碼來源:ClientManageProcessorTest.java