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

ChannelRead in ChannelHandlerAdapter is not reading the entire message from the channel. Data packet is being chunked out to 2 packets #194

Open
SwethaEmerson opened this issue Jul 1, 2022 · 0 comments

Comments

@SwethaEmerson
Copy link

I'm using DotNetty.Transport.Channels.ChannelHandlerAdapter to read the incoming packets from the cloud gateway. channelRead() of ChannelHandler is reading and returning the packets if the size of the packet is less than 400 bytes. When I try to push a data packet of size 4000 from the device to the gateway, the packet is being chunked out to 2 packets with size, 1024 and 2976. If I try to push the same packet from the device again, gateway is able to read the entire packet in this attempt(2nd time).

I'm using ReadableBytes(from IByteBuffer) as the size of the packet to read it from the channel.The readable bytes value is set to 1024 in the above mentioned case.

I have tried different options like using MqttDecoder but it did not help.

@SwethaEmerson SwethaEmerson changed the title ChannelRead in ChannelHandlerAdapter is reading the entire message from the channel. Data packet is being chunked out to 2 packets ChannelRead in ChannelHandlerAdapter is not reading the entire message from the channel. Data packet is being chunked out to 2 packets Jul 1, 2022
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

No branches or pull requests

1 participant