Closed cmdjulian closed 5 months ago
This pull request adds support for suspending methods in the MqttSubscriberCollector and MqttHandler. This allows for suspending methods to be used as subscriber methods. For instance:
@MqttSubscribe("test", qos = MqttQos.EXACTLY_ONCE) suspend fun test(payload: String) { ... }
For the existing calling mechanism based on Method, I changed it to use MethodHandle. I also added some tests for invoking the handler.
Method
MethodHandle
This pull request adds support for suspending methods in the MqttSubscriberCollector and MqttHandler.
This allows for suspending methods to be used as subscriber methods. For instance:
For the existing calling mechanism based on
Method
, I changed it to useMethodHandle
.I also added some tests for invoking the handler.