Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-1268 Fix LargeMessages over STOMP #1394

Closed
wants to merge 1 commit into from

Conversation

mtaylor
Copy link
Contributor

@mtaylor mtaylor commented Jul 10, 2017

No description provided.

@@ -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()];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getReadOnlyBuffer() ???

you would need to cache the bodyBuffer somewhere.. bodyBuffer = message.getReadONlyBuffer();

and only use the bodyBuffer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clebertsuconic yes. Will change. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants