Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1394#discussion_r126460213
  
    --- Diff: 
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java
 ---
    @@ -389,7 +389,7 @@ public void sendInternalLarge(CoreMessage message, 
boolean direct) throws Except
           long id = storageManager.generateID();
           LargeServerMessage largeMessage = 
storageManager.createLargeMessage(id, message);
     
    -      byte[] bytes = new byte[message.getBodyBuffer().writerIndex() - 
CoreMessage.BODY_OFFSET];
    +      byte[] bytes = new byte[message.getBodyBuffer().readableBytes()];
    --- End diff --
    
    getReadOnlyBuffer() ???
    
    you would need to cache the bodyBuffer somewhere.. bodyBuffer = 
message.getReadONlyBuffer();
    
    and only use the bodyBuffer.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to