There should be a base class to inherit from that exposes specific functions to MQTT (presumably all public ones on default), or takes an existing class/instance and relays function calls, as well as a class that simply overwrites the "send" function and tries to connect to a RPC endpoint.
This should be simple!
There should be a base class to inherit from that exposes specific functions to MQTT (presumably all public ones on default), or takes an existing class/instance and relays function calls, as well as a class that simply overwrites the "send" function and tries to connect to a RPC endpoint.