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

    https://github.com/apache/activemq-artemis/pull/1394#discussion_r126460383
  
    --- 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 --
    
    it would be safer to do it this way.. I'm sure it wouldn't affect other 
messages.. 
    message.getBodyBuffer() may affect the position of a message if it's on a 
topic with many subscriptions.


---
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