liyiwen3 opened a new issue #1714: Why return true where write consume queue 
fail
URL: https://github.com/apache/rocketmq/issues/1714
 
 
   code like this: 
   public boolean appendMessage(final byte[] data) {
           int currentPos = this.wrotePosition.get();
   
           if ((currentPos + data.length) <= this.fileSize) {
               try {
                   this.fileChannel.position(currentPos);
                   this.fileChannel.write(ByteBuffer.wrap(data));
               } catch (Throwable e) {
                   log.error("Error occurred when append message to 
mappedFile.", e);
               }
               this.wrotePosition.addAndGet(data.length);
               return true;
           }
   
           return false;
       }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to