简体   繁体   English

使用Google cloud pub sub实施MQTT

[英]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.

相关问题 Google App Engine上的Google Cloud Pub / Sub过早达到QPS限制 - Google Cloud Pub/Sub on Google App Engine hits QPS limit too soon 在烧瓶中实现MQTT - Implementing MQTT in flask 当通过 GKE POD 内的 Cron 执行时,无法使用 Python SDK 将消息发布到 GCP Pub/Sub - Unable to publish messages to GCP Pub/Sub using Python SDK when executed via Cron inside a GKE POD 使用google.cloud导入bigquery时没有名为cloud的模块 - No module named cloud while using google.cloud import bigquery 将Google Cloud Storage与GAE远程API配合使用 - Using Google Cloud Storage with GAE remote API 使用GO的Google App Engine的Cloud IDE - Cloud IDE for Google App Engine using GO 使用.boto Google Cloud Storage API进行身份验证 - Authenticating using .boto google cloud storage api 在使用Redis发布/订阅的Python服务中调试内存泄漏 - Debugging memory leak in Python service that uses Redis pub/sub 用于golang &lt;-&gt; python通信的最简单的pub-sub,可能跨机器吗? - Simplest pub-sub for golang <--> python communication, possibly across machines? 使用Google Cloud Platform的简单任务队列:Google PubSub问题 - Simple task queue using Google Cloud Platform : issue with Google PubSub
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM