You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by mtaylor <gi...@git.apache.org> on 2017/07/10 15:40:11 UTC

[GitHub] activemq-artemis pull request #1394: ARTEMIS-1268 Fix LargeMessages over STO...

GitHub user mtaylor opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1394

    ARTEMIS-1268 Fix LargeMessages over STOMP

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mtaylor/activemq-artemis ARTEMIS-1268

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1394.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1394
    
----
commit d8be0eff3fa085b2435817e4bcd517f50a63c7ec
Author: Martyn Taylor <mt...@redhat.com>
Date:   2017-07-10T15:38:37Z

    ARTEMIS-1268 Fix LargeMessages over STOMP

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1394: ARTEMIS-1268 Fix LargeMessages over STO...

Posted by clebertsuconic <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1394: ARTEMIS-1268 Fix LargeMessages over STO...

Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1394#discussion_r126462205
  
    --- 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 --
    
    @clebertsuconic yes.  Will change.  Cheers.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1394: ARTEMIS-1268 Fix LargeMessages over STO...

Posted by clebertsuconic <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #1394: ARTEMIS-1268 Fix LargeMessages over STO...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1394


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---