Based on the actual usage scenarios of customers, write customized MQTT message examples.#16674
Open
wenyanshi-123 wants to merge 2 commits intoapache:masterfrom
Open
Based on the actual usage scenarios of customers, write customized MQTT message examples.#16674wenyanshi-123 wants to merge 2 commits intoapache:masterfrom
wenyanshi-123 wants to merge 2 commits intoapache:masterfrom
Conversation
6685c16 to
fc923af
Compare
…TT message examples
fc923af to
8f238e1
Compare
jt2594838
reviewed
Nov 3, 2025
Comment on lines
57
to
59
| if (payload == null) { | ||
| return Collections.emptyList(); | ||
| return new ArrayList<>(); | ||
| } |
| return messages; | ||
| } | ||
| return ret; | ||
| throw new JsonParseException("payload is invalidate"); |
Contributor
There was a problem hiding this comment.
May provide the txt or the jsonElement.
Comment on lines
+85
to
+86
| String database = !topic.contains("/") ? topic : topic.substring(0, topic.indexOf("/")); | ||
| String table = "test_table"; |
Contributor
There was a problem hiding this comment.
May parse the table name from the topic?
Comment on lines
+40
to
+42
| if (payload == null) { | ||
| return null; | ||
| } |
Contributor
There was a problem hiding this comment.
Better to keep consistency between examples.
Comment on lines
+44
to
+48
| String line = payload.toString(StandardCharsets.UTF_8); | ||
| // parse data from the line and generate Messages and put them into List<Meesage> ret | ||
| List<Message> ret = new ArrayList<>(); | ||
| // this is just an example, so we just generate some Messages directly | ||
| for (int i = 0; i < 3; i++) { |
Contributor
There was a problem hiding this comment.
The line should still be used, otherwise, this examples means nothing.
caozj1011
reviewed
Nov 3, 2025
Contributor
There was a problem hiding this comment.
Does this example include both the tree model and the table model? It is recommended to write about both
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on the actual usage scenarios of customers, write customized MQTT message examples.