Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NichtEuler opened this issue Oct 18, 2019 · 0 comments
Open

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

NichtEuler opened this issue Oct 18, 2019 · 0 comments

Comments

@NichtEuler
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant