You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by gaohoward <gi...@git.apache.org> on 2018/03/22 04:20:56 UTC
[GitHub] activemq-artemis pull request #1965: NO-JIRA Fixing Stomp large message test...
GitHub user gaohoward opened a pull request:
https://github.com/apache/activemq-artemis/pull/1965
NO-JIRA Fixing Stomp large message tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gaohoward/activemq-artemis f_fix_stomp_lm
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1965.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 #1965
----
----
---
[GitHub] activemq-artemis pull request #1965: NO-JIRA Fixing Stomp large message test...
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/1965#discussion_r176408421
--- Diff: artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java ---
@@ -154,12 +154,16 @@ public int sendMessage(MessageReference ref,
encoder.encode(buffer, bodySize);
encoder.close();
} else {
- buffer = coreMessage.getReadOnlyBodyBuffer();
+ if (Boolean.TRUE.equals(serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED))) {
+ buffer = coreMessage.getBodyBuffer();
--- End diff --
@gaohoward I will send a PR... the same code you wrote would work with readOnlyBuffer...
Besides this problem is not just stomp.. AMQP and MQTT would fail. I will make this generic.
---
[GitHub] activemq-artemis issue #1965: NO-JIRA Fixing Stomp large message tests
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:
https://github.com/apache/activemq-artemis/pull/1965
You cannot touch the body of the message. You could have another consumer on a different t subscriton racing on the buffer.
---
[GitHub] activemq-artemis pull request #1965: NO-JIRA Fixing Stomp large message test...
Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1965#discussion_r176415286
--- Diff: artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java ---
@@ -154,12 +154,16 @@ public int sendMessage(MessageReference ref,
encoder.encode(buffer, bodySize);
encoder.close();
} else {
- buffer = coreMessage.getReadOnlyBodyBuffer();
+ if (Boolean.TRUE.equals(serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED))) {
+ buffer = coreMessage.getBodyBuffer();
--- End diff --
@clebertsuconic Thanks!
---
[GitHub] activemq-artemis issue #1965: NO-JIRA Fixing Stomp large message tests
Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on the issue:
https://github.com/apache/activemq-artemis/pull/1965
please do not merge. We need discussion.
---
[GitHub] activemq-artemis pull request #1965: NO-JIRA Fixing Stomp large message test...
Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1965#discussion_r176306425
--- Diff: artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java ---
@@ -154,12 +154,16 @@ public int sendMessage(MessageReference ref,
encoder.encode(buffer, bodySize);
encoder.close();
} else {
- buffer = coreMessage.getReadOnlyBodyBuffer();
+ if (Boolean.TRUE.equals(serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED))) {
+ buffer = coreMessage.getBodyBuffer();
--- End diff --
@clebertsuconic Here I use body buffer instead of readonly bodybuffer, as I need to decompress the buffer and write into the message before delivering (like in large message case). Don't know how to do it a better way?
---
[GitHub] activemq-artemis pull request #1965: NO-JIRA Fixing Stomp large message test...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/1965
---