Skip to content

ARTEMIS-6119 Stomp subscriber cannot receive compressed messages#6522

Merged
clebertsuconic merged 1 commit into
apache:mainfrom
AntonRoskvist:ARTEMIS-6119
Jun 17, 2026
Merged

ARTEMIS-6119 Stomp subscriber cannot receive compressed messages#6522
clebertsuconic merged 1 commit into
apache:mainfrom
AntonRoskvist:ARTEMIS-6119

Conversation

@AntonRoskvist

Copy link
Copy Markdown
Contributor

If a Stomp subscriber tries to receive a message that has been compressed by a Core client it will fail (because no inflation of the compressed body takes place)

This change would use the Core message getDataBuffer() to manage this along with handling of "regular" large messages in the VersionedStompFrameHandler (basically moving the Large body read step from there to use the existing one on the Core message)

All tests pass, though I have limited experience with the Stomp protocol so if anything seems off just let me know


@Test
public void testReceiveCompressedMessage() throws Exception {
String DATA = RandomUtil.randomAlphaNumericString(1024 * 1024);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this little detail here was great.. the test generated a unique string that's not very compressed. I tried using a simple "LARGE".repeat(200 * 1024) and the large message file was not there.. and I figured it out you used this to make sure it was kept as a file.. nice test!

@AntonRoskvist AntonRoskvist Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, yes I originally had the test produce two messages, one with the current string and the other just doing String DATA2 = "a".repeat(1024 * 1024); to test both branches in the VersionedStompFrameHandler.

I removed the second one when I realized I could just remove the populateFrameBodyFromLargeMessage method all together. Keeping the one as a large message on the broker made the most sense

@clebertsuconic clebertsuconic merged commit 3312b71 into apache:main Jun 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants