Skip to content

Remove extra buffer copy in StompNIOSSLTransport#2107

Merged
cshannon merged 1 commit into
apache:mainfrom
cshannon:stomp-niossl-optimize
Jun 11, 2026
Merged

Remove extra buffer copy in StompNIOSSLTransport#2107
cshannon merged 1 commit into
apache:mainfrom
cshannon:stomp-niossl-optimize

Conversation

@cshannon

Copy link
Copy Markdown
Contributor

Optimizes the StompNIOSSLTransport by removing the unnecessary extra byte array allocation and buffer copy when processing frames

Optimizes the StompNIOSSLTransport by removing the unnecessary extra
byte array allocation and buffer copy when processing frames
@cshannon cshannon requested review from mattrpav and tabish121 June 11, 2026 21:29

@tabish121 tabish121 left a comment

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.

Makes sense to go straight to the ByteBuffer, so long as the tests pass

@mattrpav mattrpav left a comment

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.

LGTM. Good cleanup

@cshannon

Copy link
Copy Markdown
Contributor Author

As an aside, MQTT also has the same issue but is not as trivial to fix and has more cleanup to replace it including tests. I figure not as many people use MQTT but it's something that could be done in another PR

I'll let the tests pass and if no issue i'll merge.

@cshannon cshannon self-assigned this Jun 11, 2026
@cshannon cshannon merged commit 403ac4f into apache:main Jun 11, 2026
9 of 10 checks passed
@cshannon cshannon deleted the stomp-niossl-optimize branch June 11, 2026 23:44
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Apache ActiveMQ v6.3.0 Jun 11, 2026
cshannon added a commit that referenced this pull request Jun 12, 2026
Optimizes the StompNIOSSLTransport by removing the unnecessary extra
byte array allocation and buffer copy when processing frames

(cherry picked from commit 403ac4f)
cshannon added a commit that referenced this pull request Jun 12, 2026
Optimizes the StompNIOSSLTransport by removing the unnecessary extra
byte array allocation and buffer copy when processing frames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants