amenzhinsky / iothub

Azure IoT Hub SDK for Golang
MIT License
53 stars 57 forks source link

rid is supposed to be base 16, not base 10. #32

Closed bocajim closed 3 years ago

bocajim commented 3 years ago

Item #1: In testing, if you execute a method more than 9 times, it will begin to fail as the rid goes ...7,8,9,a,b,c. Changed the RID handling for both the method and the twins to use base16 for proper compliance.

Item #2: the underlying MQTT subscription is a wildcard, but you still have to name each method, I want a wildcard method, so I changed the behavior so you can subscribe to method "#", which will be considered the fallback or wildcard handler. If a method comes in and doesn't match a definitive name, it will call the callback associated with #, and will store the method name in the payload object in the "_method" key.

bocajim commented 3 years ago

canceling pull request, additional changes to support my use case necessitated a fork that will be difficult to merge back at this time.