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

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

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

Message.isWaitStoreMsgOK介绍

暂无

代码示例

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

  1. Assert.assertEquals(message.getTags(), messageByMsgId.getTags());
  2. Assert.assertEquals(message.isWaitStoreMsgOK(), messageByOffset.isWaitStoreMsgOK());
  3. Assert.assertEquals(message.isWaitStoreMsgOK(), messageByMsgId.isWaitStoreMsgOK());

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

  1. public static MessageBatch generateFromList(Collection<Message> messages) {
  2. assert messages != null;
  3. assert messages.size() > 0;
  4. List<Message> messageList = new ArrayList<Message>(messages.size());
  5. Message first = null;
  6. for (Message message : messages) {
  7. if (message.getDelayTimeLevel() > 0) {
  8. throw new UnsupportedOperationException("TimeDelayLevel in not supported for batching");
  9. }
  10. if (message.getTopic().startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
  11. throw new UnsupportedOperationException("Retry Group is not supported for batching");
  12. }
  13. if (first == null) {
  14. first = message;
  15. } else {
  16. if (!first.getTopic().equals(message.getTopic())) {
  17. throw new UnsupportedOperationException("The topic of the messages in one batch should be the same");
  18. }
  19. if (first.isWaitStoreMsgOK() != message.isWaitStoreMsgOK()) {
  20. throw new UnsupportedOperationException("The waitStoreMsgOK of the messages in one batch should the same");
  21. }
  22. }
  23. messageList.add(message);
  24. }
  25. MessageBatch messageBatch = new MessageBatch(messageList);
  26. messageBatch.setTopic(first.getTopic());
  27. messageBatch.setWaitStoreMsgOK(first.isWaitStoreMsgOK());
  28. return messageBatch;
  29. }

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

  1. Assert.assertEquals(message.getTags(), messageByMsgId.getTags());
  2. Assert.assertEquals(message.isWaitStoreMsgOK(), messageByOffset.isWaitStoreMsgOK());
  3. Assert.assertEquals(message.isWaitStoreMsgOK(), messageByMsgId.isWaitStoreMsgOK());

代码示例来源:origin: jiangxinlingdu/rocketmq-all-4.1.0-incubating

  1. public static MessageBatch generateFromList(Collection<Message> messages) {
  2. assert messages != null;
  3. assert messages.size() > 0;
  4. List<Message> messageList = new ArrayList<Message>(messages.size());
  5. Message first = null;
  6. for (Message message : messages) {
  7. if (message.getDelayTimeLevel() > 0) {
  8. throw new UnsupportedOperationException("TimeDelayLevel in not supported for batching");
  9. }
  10. if (message.getTopic().startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
  11. throw new UnsupportedOperationException("Retry Group is not supported for batching");
  12. }
  13. if (first == null) {
  14. first = message;
  15. } else {
  16. if (!first.getTopic().equals(message.getTopic())) {
  17. throw new UnsupportedOperationException("The topic of the messages in one batch should be the same");
  18. }
  19. if (first.isWaitStoreMsgOK() != message.isWaitStoreMsgOK()) {
  20. throw new UnsupportedOperationException("The waitStoreMsgOK of the messages in one batch should the same");
  21. }
  22. }
  23. messageList.add(message);
  24. }
  25. MessageBatch messageBatch = new MessageBatch(messageList);
  26. messageBatch.setTopic(first.getTopic());
  27. messageBatch.setWaitStoreMsgOK(first.isWaitStoreMsgOK());
  28. return messageBatch;
  29. }

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

  1. public static MessageBatch generateFromList(Collection<Message> messages) {
  2. assert messages != null;
  3. assert messages.size() > 0;
  4. List<Message> messageList = new ArrayList<Message>(messages.size());
  5. Message first = null;
  6. for (Message message : messages) {
  7. if (message.getDelayTimeLevel() > 0) {
  8. throw new UnsupportedOperationException("TimeDelayLevel in not supported for batching");
  9. }
  10. if (message.getTopic().startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
  11. throw new UnsupportedOperationException("Retry Group is not supported for batching");
  12. }
  13. if (first == null) {
  14. first = message;
  15. } else {
  16. if (!first.getTopic().equals(message.getTopic())) {
  17. throw new UnsupportedOperationException("The topic of the messages in one batch should be the same");
  18. }
  19. if (first.isWaitStoreMsgOK() != message.isWaitStoreMsgOK()) {
  20. throw new UnsupportedOperationException("The waitStoreMsgOK of the messages in one batch should the same");
  21. }
  22. }
  23. messageList.add(message);
  24. }
  25. MessageBatch messageBatch = new MessageBatch(messageList);
  26. messageBatch.setTopic(first.getTopic());
  27. messageBatch.setWaitStoreMsgOK(first.isWaitStoreMsgOK());
  28. return messageBatch;
  29. }

相关文章