When a device publishes telemetry and state events to Cloud IoT Core, those events are propagated to Cloud Pub/Sub topics associated with the device registry. In previous examples, we configured the weather-sensors device registry to push telemetry events to the weather-telemetry topic and device state events to the weather-device-state topic. As covered earlier in this chapter, Cloud Pub/Sub queues messages based on subscriptions. When a Pub/Sub topic has no subscriptions, any messages published to that topic will simply be dropped.
Because device events are pushed to Cloud Pub/Sub topics, any service that can consume Pub/Sub messages is capable of receiving device events. Google Cloud Functions are a good candidate ...