I want to implement MQTT using pubsub API of google app engine in python. How can I run pub sub library in standard library. If I am required to run the older version of this API, can anyone provide with the sample. Also one issue with the latest library is that it is alpha version. Later on I will connect the MQTT client using the GCP-IOT protocol.
2 Answers
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.
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. More details here: https://cloud.google.com/iot-core/
I second checking out Google IoT Core.
If you have a special use case, you could always connect Google PubSub to another MQTT-enabled IoT platform like Losant. Here is an example of it:
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.
Disclaimer: I work for Losant.