Closed avanlievenoogen closed 1 year ago
Hey @avanlievenoogen , first of all thanks for the contribution.
About your changes, I see two problems:
"vessels/self/electrical/batteries/+/current"
or "vessels/+/navigation/#"
, which is not possible at all with the .getBus(topic)
method, so we would be loosing an important feature there.As I mentioned in the other PR, I ported the debounceImmediate
function in particular from the signalk-mqtt-gw
plugin, and I'm not 100% sure that the original intention still applies here. So with that in mind, and considering it's currently doing more harm than good, I'm going to remove the debounceImmediate
.
If we then have overload problems, we could add throttling as an option in the plugin configuration page, or find a buffering mechanism to store deltas and send them in batches to MQTT. But I wouldn't waste efforts right now on a problem that might not even exist.
Hi @iuriaranda , thanks for taking the time to look at my proposal. I agree with your rational and I recognize that we would loose flexibility. It's too bad that the getBus doesn't allow wildcards which forces you to make subscription administration functionality in the plugin itself which I think would be better placed inside the server. If all the active plugins have to check all the Delta's themselves it feels like a waste.
See comment at other pull request: https://github.com/iuriaranda/signalk-mqtt-bridge/pull/4#issuecomment-1485344917