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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

franz1981
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 <[hidden email]>
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

franz1981
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

franz1981
In reply to this post by franz1981
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

franz1981
In reply to this post by franz1981
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

franz1981
In reply to this post by franz1981
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Loading...