The MQTT client samples on GitHub illustrate how a device connects and interacts with the Cloud IoT Core MQTT bridge. Samples are provided in several different languages and are designed to help you get started with your IoT project.
Before running the samples, create a project, a registry, devices, a Cloud Pub/Sub topic, and public/private key pairs. You might also want to complete the quickstart, and review the registry management and device management code samples.
Be sure to review the README for each sample.