private void assertMsg(Message msg) {
   assertNotNull(msg);
   assertEquals(9999L, msg.getId());
   assertEquals("test", msg.getTopic());
   assertFalse(msg.hasAttribute());
   assertEquals(0, MessageAccessor.getFlag(msg));
   assertEquals("hello", new String(msg.getData()));
 }
示例#2
0
 @Override
 public void appendCouldNotProcessMessage(final Message message) throws IOException {
   // 目前的处理是交给本地存储管理并重试
   log.warn(
       "Message could not process,save to local.MessageId="
           + message.getId()
           + ",Topic="
           + message.getTopic()
           + ",Partition="
           + message.getPartition());
   this.recoverStorageManager.append(this.consumerConfig.getGroup(), message);
 }