Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sparkplug-wg] NBIRTH error

Hello Zachary,

I haven't seen your protobuf exception but reading about it on the internet, it sounds like something about the data could be amiss or possibly something happening in the conversion/interpretation. 

I have a couple comments about your NBIRTH payload.

Your "bdSeq" type must be an Int64 and the "seq" must be zero (because it's an NBIRTH).

The Tahu package has a Java example project called the "listener". This is a minimal project that subscribes and publishes payloads. It might be a good place to start to compare what is being published to the MQTT Server.

Bryce


On Mon, Mar 6, 2023 at 3:01 PM Zachary Roisum <zacharyroisum@xxxxxxxxx> wrote:
After a successful MQTT connection, subscription to the node command topic, I am attempting to publish an NBIRTH payload.  The broker is Ignition - CirrusLink MQTT Distributor.  The error message from Ignition's logs is:

Failed to handle Sparkplug B message on topic spBv1.0/Home/NBIRTH/NodeTest

com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag.

The payload as reported by Ignition's logs is:

content <{"timestamp":1677746244901,"metrics":[{"name":"bdSeq","timestamp":1677746244901,"dataType":"Uint64","value":16},{"name":"Node Control/Rebirth","timestamp":1677746244901,"dataType":"Boolean","value":false}],"seq":1}>
Or in human-readable format (copied from Ignition's logs, deleted "content <" and ">", applied JSON formatting):
{
    "timestamp": 1677746244901,
    "metrics": [{
            "name": "bdSeq",
            "timestamp": 1677746244901,
            "dataType": "Uint64",
            "value": 16
        }, {
            "name": "Node Control/Rebirth",
            "timestamp": 1677746244901,
            "dataType": "Boolean",
            "value": false
        }
    ],
    "seq": 1
}

This message as close as I can read matches some example messages from the specification.  I have tried using the SparkplugTCK, but it appears that this error happens too early for that tool to log, or I configured SparkplugTCK incorrectly.  Is there an embarrassing typo I didn't catch, or what are suggestions to continue troubleshooting?  Thank you for your help,
_______________________________________________
sparkplug-wg mailing list
sparkplug-wg@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sparkplug-wg

Back to the top