Skip to content

MQTTv5 Implementation #316

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

Open
wants to merge 344 commits into
base: main
Choose a base branch
from
Open

MQTTv5 Implementation #316

wants to merge 344 commits into from

Conversation

adituc
Copy link

@adituc adituc commented Mar 11, 2025

Upgrading MQTT Library to support v5 features

Description

Test Steps

  • Unit Tests are added for all new and modified features.
  • Unit Tests for MQTTv5 functions are added in a separate folder in test.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@DakshitBabbar DakshitBabbar changed the base branch from main to mqttv5-dev March 18, 2025 04:45
@DakshitBabbar DakshitBabbar marked this pull request as ready for review March 18, 2025 04:46
@DakshitBabbar DakshitBabbar marked this pull request as draft March 18, 2025 06:06
@@ -143,7 +134,9 @@ static int32_t sendBuffer( MQTTContext_t * pContext,
static MQTTStatus_t sendConnectWithoutCopy( MQTTContext_t * pContext,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should audit the return values of all the functions in the doxygen documentation. Many of them are stale or non-exhaustive.

}
else if( ( ( pIncomingPacket->remainingLength + variableLengthEncodedSize( pIncomingPacket->remainingLength ) + 1U ) > maxPacketSize ) && ( skipMaxPacketSizeCheck != true ) )
{
LogError( ( "Packet Size cannot be greater than max packet size. " ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a log statement for this bad parameter return type.

{
LogError( ( "pConnectProperties cannot be NULL for CONNACK packet." ) );
status = MQTTBadParameter;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to document why the pConnectProperties parameter cannot be NULL for receiving a CONNACK packet. The reason is that even if the user does not want to parse the properties in the connack the server may still send them. THe properties in the connack are ought to be followed by the user. For instance, the max packet size of the server cannot be ignored by the user. Hence the user should process the connack properties.

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

Successfully merging this pull request may close these issues.

5 participants