1

In my project multiple IoT devices need to publish to a single topic and cloud functions listening to that topic need to process data published by IoT devices. Multiple devices should be able to publish at the same time.A MQTT broker logic is needed. But in Google IoT Core "The MQTT bridge allows only a single connection for a given device ID. If a second device connects with the ID of a device that is already connected, the older device connection will be closed automatically.".

I am new to google cloud IoT and trying to understand basic concepts. I have looked into gateways but I am not sure that gateways work as broker. Can multiple devices publish through a gateway to a same single topic? or should I implement/add a MQTT broker(mosquitto I guess) myself or is there an another way to use google Cloud IoT in my case? Could you guys direct me to the right direction. Opening sub/pub topics for each device doesn't sound right because in my project there can be thousands of IoT devices.

  • You need to understand that there is practically no overhead to a topic. And a wildcard subscription will easily get you all the messages for a topic tree. A topic (or multiple) per device is the right approach – hardillb Jan 12 '21 at 14:42
  • In order to understand your issue. Have you set up your process ? If yes, have you gotten any error? Otherwise could you explain what you have done so far so I can investigate deeper into your needs. – Alexandre Moraes Jan 12 '21 at 15:20
  • Walk before you run. You can get started with Google IoT Core in minutes at https://mqttlab.iotsim.io/gcp – Gambit Support Jan 12 '21 at 20:41

1 Answers1

1

Let all the devices in the registry publish messages to the common topic given to the registry.Then trigger a cloud function with this topic. You can process the messages with cloud function based on the deviceId