eclipse/paho.mqtt.m2mqtt

Possibility to add Handler to specific topics (Filter by topic)

NichtEuler opened this issue · 0 comments

Hi,

ist there a possibility to add an eventhandler to a specific topic, like in System.Net.Mqtt:
mqttClient.MessageStream.Where(msg => msg.Topic == "home/lights/kitchen").Subscribe(kitchen);

 private void kitchen(MqttApplicationMessage obj)
        {
                lightSwitch.Text = "Lights are: " + ByteArrayToString(obj.Payload);
        }

So you dont have to filter by topic in the eventhandler you've added to client.MqttMsgPublishReceived?