MQTT获得完整主题参数

时间:2017-04-02 21:28:29

标签: c# mqtt

我正在使用Mqtt Emitter作为我的应用程序。我想要做的就是在我放"+"的地方获取参数。 例如;

   emitter.On("input/+/sensor", (channel, msg) =>
      {//after emitter publish the message, I want to know which company
       //is publishing the message by knowing the value of "+".
         Console.WriteLine(Encoding.UTF8.GetString(msg));
      });
  emitter.Publish("input/company1/sensor", "hellooo");

我对不同的想法持开放态度。

0 个答案:

没有答案