Azure / Azure/DotNetty

MQTT PUBLISH packet encoder splits the topic and payload into different frames

Open
#553 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.3k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

The [Mqtt encoder](https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Codecs.Mqtt/MqttEncoder.cs#L234-L273) splits the PUBLISH packet into different frames, one containing the topic and QoS information, the other containing an optional payload data.

This causes the downstream socket implementation to send them as different different packets.
Since the [netty implementation](https://github.com/netty/netty/blob/4.1/codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttEncoder.java#L420-L456) encodes the entire PUBLISH packet into the same byte buffer, is there a particular reason dotnetty chose to implement it this way?

Related issue: https://github.com/Azure/azure-iot-sdk-csharp/issues/1814

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.