-
Notifications
You must be signed in to change notification settings - Fork 129
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
key multiPart missing #389
Comments
What tool are you using to view the resulting message? |
I'm using mqttfx but I also wrote a Java class for encode and decode sparkplug messages and I have always the same issue. |
I know the last version of MQTT.fx I used didn't properly display all portions of the Metric including the MetaData. Based on your code, I think you've set it up properly. What does your decoder code look like? What if you use the Tahu decoder? |
I tried with a python script:
timestamp: 1718803102 and with a java tahu example.
"timestamp": 1718887068, Metric [name=cmdFileUpload, alias=10000, timestamp=Tue Jan 20 22:28:07 CET 1970, dataType=String, isHistorical=null, isTransient=null, isNull=false, metaData=MetaData [isMultiPart=true, contentType=application/json, size=46, seq=0, fileName=12, fileType=base64, md5=bd694094acf029e4db780a322fcd7611, description=config], propertySet=null, value=ewogICJJRUMtMTA0LVNsYXZlIjogewogICAgInZlcnNpb24iOiAxCiAgfQp9Cg==] java -jar ./java/examples/listener/target/example_listener-1.0.7.jar Json sample: hex dump for the binary message:
00000000 08 9e b5 cb b3 06 12 ac 01 0a 0d 63 6d 64 46 69 |...........cmdFi| I tried also on this website : to decode the Protobuf message and I don't find the definition of the key "multiPart": |
I solved the problem using the latest version of the library 1.0.7. |
I have a problem using the key "MultiPart" for the key "Metadata".
I wrote a java sample code:
IssueMetaDataMultiPart.java.txt
This is the output written on the console:
`
MetaData [isMultiPart=true, contentType=text/plain, size=12, seq=0, fileName=fileName, fileType=fileType, md5=md5, description=config]
Metric [name=file, alias=1234, timestamp=1718715733989, dataType=String, isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=true, contentType=text/plain, size=12, seq=0, fileName=fileName, fileType=fileType, md5=md5, description=config], properties=null, value=Hello world!, isNull=false]
`
This is the message send to the Broker MQTT:
{
"timestamp": 1718715733989,
"metrics": [
{
"name": "file",
"alias": 1234,
"timestamp": 1718715733989,
"dataType": "String",
"metaData": {
"contentType": "text/plain",
"size": 12,
"seq": 0,
"fileName": "fileName",
"fileType": "fileType",
"md5": "md5",
"description": "config"
},
"value": "Hello world!"
}
],
"seq": 0
}
the key isMultiPart is missing.
I tried the same code with the Tahu Libraries 1.0.0 and 1.0.7 but it doesn't work.
Someone could help me ?
thanks in advance
Marco
The text was updated successfully, but these errors were encountered: