Skip to content

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

@678098

Description

@678098

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions