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

Schema event builder allocate 4kb buffer to write 8 byte EventHeader #43

Open
1 task done
678098 opened this issue Oct 24, 2023 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@678098
Copy link
Collaborator

678098 commented Oct 24, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If you log ByteBuffer[] generated by SchemaEventBuilder just before sending, you can see 2 buffers, one of these has limit==8 and capacity==4096. The event header is written to a separate buffer which is not used after this.

16:34:21,151 (pool-4-thread-1) ERROR RequestManager:319 java.nio.HeapByteBuffer[pos=0 lim=8 cap=4096]
16:34:21,151 (pool-4-thread-1) ERROR RequestManager:319 java.nio.HeapByteBuffer[pos=0 lim=228 cap=4096]
16:34:21,153 (pool-4-thread-1) INFO RequestManager:324 Message sent: Request message: {"rId":3,"openQueue":{"handleParameters":{"uri":"bmq://bmq.test.mem.fanout/java-it-5dfa06ed-f58c-40c0-ba70-9de9be753d77","qId":0,"subIdInfo":{"subId":2,"appId":"bar"},"flags":2,"readCount":1,"writeCount":0,"adminCount":0}}}; Timeout duration: PT20S

Expected Behavior

Will be good to use the same buffer for both event header and the event payload.

Steps To Reproduce

Log

BlazingMQ Java SDK Version

0.0.10

Anything else?

No response

@678098 678098 added the bug Something isn't working label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant