[英]implementing MQTT using Google cloud pub sub
I want to implement MQTT using pubsub API of google app engine in python. 我想在python中使用Google App Engine的pubsub API实现MQTT。 How can I run pub sub library in standard library.
如何在标准库中运行pub子库。 If I am required to run the older version of this API, can anyone provide with the sample.
如果需要运行此API的较旧版本,则任何人都可以提供示例。 Also one issue with the latest library is that it is alpha version.
最新库的另一个问题是它是Alpha版本。 Later on I will connect the MQTT client using the GCP-IOT protocol.
稍后,我将使用GCP-IOT协议连接MQTT客户端。
I would strongly advise against it. 我强烈建议不要这样做。 Not only you are wasting your time and energy, you are also trying to use something that is not meant to be used it that way.
不仅您在浪费时间和精力,而且还在尝试使用不希望以这种方式使用的东西。 In the end, the cost is going to be huge compared deploying an MQTT on your own instance.
最后,与在您自己的实例上部署MQTT相比,成本将是巨大的。
If you are looking for a fully managed solution from GCP, you might be interested in trying out GCP Core IOT which is currently in private beta. 如果您正在寻找来自GCP的完全托管的解决方案,则可能有兴趣尝试使用当前处于非公开测试阶段的GCP Core IOT。 More details here: https://cloud.google.com/iot-core/
此处有更多详细信息: https : //cloud.google.com/iot-core/
I second checking out Google IoT Core. 我第二次检查了Google IoT Core。
If you have a special use case, you could always connect Google PubSub to another MQTT-enabled IoT platform like Losant. 如果您有特殊用例,则始终可以将Google PubSub连接到另一个启用了MQTT的IoT平台(如Losant)。 Here is an example of it:
这是一个例子:
https://docs.losant.com/applications/integrations/#google-pubsub https://docs.losant.com/applications/integrations/#google-pubsub
Then, as you subscribe to messages from PubSub you could publish to MQTT topics and vice versa. 然后,当您订阅来自PubSub的消息时,可以发布到MQTT主题,反之亦然。
Disclaimer: I work for Losant. 免责声明:我为Losant工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.