Skip to content

JS Mqtt - PR #2 Data model and packet logging#695

Draft
bretambrose wants to merge 6 commits intoJsMqtt-1-Preliminariesfrom
JsMqtt-2-Model
Draft

JS Mqtt - PR #2 Data model and packet logging#695
bretambrose wants to merge 6 commits intoJsMqtt-1-Preliminariesfrom
JsMqtt-2-Model

Conversation

@bretambrose
Copy link
Contributor

@bretambrose bretambrose commented Mar 3, 2026

Additional packet definitions and helper functions for the internal JS MQTT client. Beyond what we currently expose in mqtt5_packet, we add two additional models:

  1. An internal model that extends the public model of mqtt5_packet with fields we don't want to publicly expose (packet id, clean start, etc...), We decode into this model.
  2. A binary model (bytes or numbers only) for all operations, internal and external. We do this to ensure we only pay the binary conversion cost of strings to bytes once. This is the model we encode and write to the socket.

Also includes logging related functionality:

  1. Additional helper functions for function-based logging that require a log level check pass before generating the log string
  2. Helper functions for logging object properties to support packet logging

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bretambrose bretambrose changed the title Data model and packet logging JS Mqtt - PR #2 Data model and packet logging Mar 3, 2026
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.

1 participant