org.apache.rocketmq.common.message.Message.getFlag()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.apache.rocketmq.common.message.Message.getFlag()方法的一些代码示例,展示了Message.getFlag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getFlag()方法的具体详情如下:
包路径:org.apache.rocketmq.common.message.Message
类名称:Message
方法名:getFlag

Message.getFlag介绍

暂无

代码示例

代码示例来源:origin: apache/rocketmq

int sysFlag = message.getFlag();
int storeSize = 4 // 1 TOTALSIZE
  + 4 // 2 MAGICCOD
int flag = message.getFlag();
byteBuffer.putInt(flag);

代码示例来源:origin: apache/rocketmq

public static Message cloneMessage(final Message msg) {
  Message newMsg = new Message(msg.getTopic(), msg.getBody());
  newMsg.setFlag(msg.getFlag());
  newMsg.setProperties(msg.getProperties());
  return newMsg;
}

代码示例来源:origin: apache/rocketmq

Assert.assertEquals(message.getBuyerId(), messageByMsgId.getBuyerId());
Assert.assertEquals(message.getFlag(), messageByOffset.getFlag());
Assert.assertEquals(message.getFlag(), messageByMsgId.getFlag());

代码示例来源:origin: apache/rocketmq

requestHeader.setSysFlag(sysFlag);
requestHeader.setBornTimestamp(System.currentTimeMillis());
requestHeader.setFlag(msg.getFlag());
requestHeader.setProperties(MessageDecoder.messageProperties2String(msg.getProperties()));
requestHeader.setReconsumeTimes(0);

代码示例来源:origin: didi/DDMQ

int sysFlag = message.getFlag();
int storeSize = 4 // 1 TOTALSIZE
  + 4 // 2 MAGICCOD
int flag = message.getFlag();
byteBuffer.putInt(flag);

代码示例来源:origin: didi/DDMQ

private SendMessageRequestHeader getMessageRequestHeader(Message msg, MessageQueue mq) {
  SendMessageRequestHeader requestHeader = new SendMessageRequestHeader();
  requestHeader.setProducerGroup(producer.getProducerGroup());
  requestHeader.setTopic(msg.getTopic());
  requestHeader.setDefaultTopic(producer.getCreateTopicKey());
  requestHeader.setDefaultTopicQueueNums(producer.getDefaultTopicQueueNums());
  requestHeader.setQueueId(mq.getQueueId());
  requestHeader.setSysFlag(0);
  requestHeader.setBornTimestamp(System.currentTimeMillis());
  requestHeader.setFlag(msg.getFlag());
  requestHeader.setProperties(MessageDecoder.messageProperties2String(msg.getProperties()));
  requestHeader.setReconsumeTimes(0);
  requestHeader.setUnitMode(producer.isUnitMode());
  return requestHeader;
}

代码示例来源:origin: didi/DDMQ

Assert.assertEquals(message.getBuyerId(), messageByMsgId.getBuyerId());
Assert.assertEquals(message.getFlag(), messageByOffset.getFlag());
Assert.assertEquals(message.getFlag(), messageByMsgId.getFlag());

代码示例来源:origin: org.apache.rocketmq/rocketmq-common

int sysFlag = message.getFlag();
int storeSize = 4 // 1 TOTALSIZE
  + 4 // 2 MAGICCOD
int flag = message.getFlag();
byteBuffer.putInt(flag);

代码示例来源:origin: didi/DDMQ

requestHeader.setSysFlag(sysFlag);
requestHeader.setBornTimestamp(System.currentTimeMillis());
requestHeader.setFlag(msg.getFlag());
requestHeader.setProperties(MessageDecoder.messageProperties2String(msg.getProperties()));
requestHeader.setReconsumeTimes(0);

代码示例来源:origin: org.apache.rocketmq/rocketmq-common

public static Message cloneMessage(final Message msg) {
  Message newMsg = new Message(msg.getTopic(), msg.getBody());
  newMsg.setFlag(msg.getFlag());
  newMsg.setProperties(msg.getProperties());
  return newMsg;
}

代码示例来源:origin: org.apache.rocketmq/rocketmq-spring-boot

public static org.springframework.messaging.Message convertToSpringMessage(
  org.apache.rocketmq.common.message.Message message) {
  org.springframework.messaging.Message retMessage =
    MessageBuilder.withPayload(message.getBody()).
      setHeader(RocketMQHeaders.KEYS, message.getKeys()).
      setHeader(RocketMQHeaders.TAGS, message.getTags()).
      setHeader(RocketMQHeaders.TOPIC, message.getTopic()).
      setHeader(RocketMQHeaders.FLAG, message.getFlag()).
      setHeader(RocketMQHeaders.TRANSACTION_ID, message.getTransactionId()).
      setHeader(RocketMQHeaders.PROPERTIES, message.getProperties()).
      build();
  return retMessage;
}

代码示例来源:origin: org.apache.rocketmq/rocketmq-client

requestHeader.setSysFlag(sysFlag);
requestHeader.setBornTimestamp(System.currentTimeMillis());
requestHeader.setFlag(msg.getFlag());
requestHeader.setProperties(MessageDecoder.messageProperties2String(msg.getProperties()));
requestHeader.setReconsumeTimes(0);

相关文章