The failure to install protobuf via pip is because pip is no longer usable for Jython 2.7. I was just fighting this earlier this week.
But for the bigger issue of generating NCMD/DCMD from Ignition, writing to the corresponding tag in Ignition has always worked fine for me. I don’t understand why you’re avoiding that and building raw MQTT payloads. Can you walk me through a simple use case flow of events that requires building a raw NCMD?