Yes, this is also a possibility
But the mosquitto_pub.exe is a 50 Kbyte and it definitely tested and already fully working
making a B4J project with its runtime and various libraries, at least a few tens of Mbyte go away, in addition to the fact that it will not be as well-tested as the executable of mosquitto suite
I will probably choose a middle way, send from pc using mosquitto_pub.exe and add a section on the receiver side to allow also reading the payload without serialization