From 52a7c8564e3802ea4c42f2f849a226dc60734d24 Mon Sep 17 00:00:00 2001 From: Jim Bennett Date: Fri, 25 Jun 2021 13:10:17 -0700 Subject: [PATCH] notes on consumer groups (#123) * Adding content * Update en.json * Update README.md * Update TRANSLATIONS.md * Adding lesson tempolates * Fixing code files with each others code in * Update README.md * Adding lesson 16 * Adding virtual camera * Adding Wio Terminal camera capture * Adding wio terminal code * Adding SBC classification to lesson 16 * Adding challenge, review and assignment * Adding images and using new Azure icons * Update README.md * Update iot-reference-architecture.png * Adding structure for JulyOT links * Removing icons * Sketchnotes! * Create lesson-1.png * Starting on lesson 18 * Updated sketch * Adding virtual distance sensor * Adding Wio Terminal image classification * Update README.md * Adding structure for project 6 and wio terminal distance sensor * Adding some of the smart timer stuff * Updating sketchnotes * Adding virtual device speech to text * Adding chapter 21 * Language tweaks * Lesson 22 stuff * Update en.json * Bumping seeed libraries * Adding functions lab to lesson 22 * Almost done with LUIS * Update README.md * Reverting sunlight sensor change Fixes #88 * Structure * Adding speech to text lab for Pi * Adding virtual device text to speech lab * Finishing lesson 23 * Clarifying privacy Fixes #99 * Update README.md * Update hardware.md * Update README.md * Fixing some code samples that were wrong * Adding more on translation * Adding more on translator * Update README.md * Update README.md * Adding public access to the container * First part of retail object detection * More on stock lesson * Tweaks to maps lesson * Update README.md * Update pi-sensor.md * IoT Edge install stuffs * Notes on consumer groups and not running the event monitor at the same time --- 2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md | 2 ++ 2-farm/lessons/5-migrate-application-to-the-cloud/README.md | 6 +++++- 3-transport/lessons/2-store-location-data/README.md | 3 +++ 3-transport/lessons/4-geofences/README.md | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md b/2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md index ea4a5ba..28361f0 100644 --- a/2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md +++ b/2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md @@ -384,6 +384,8 @@ For now, you won't be updating your server code. Instead you can use the Azure C The time values in the annotations are in [UNIX time](https://wikipedia.org/wiki/Unix_time), representing the number of seconds since midnight on 1st January 1970. + Exit the event monitor when you are done. + ### Task - control your IoT device You can also use the Azure CLI to call direct methods on your IoT device. diff --git a/2-farm/lessons/5-migrate-application-to-the-cloud/README.md b/2-farm/lessons/5-migrate-application-to-the-cloud/README.md index f92b13e..3a45597 100644 --- a/2-farm/lessons/5-migrate-application-to-the-cloud/README.md +++ b/2-farm/lessons/5-migrate-application-to-the-cloud/README.md @@ -311,7 +311,7 @@ This will create a folder inside the `soil-moisture-trigger` folder called `iot- * `"type": "eventHubTrigger"` - this tells the function it needs to listen to events from an Event Hub * `"name": "events"` - this is the parameter name to use for the Event Hub events. This matches the parameter name in the `main` function in the Python code. - * `"direction": "in",` - this is an input binding, the data from the event hub comes into the function + * `"direction": "in"` - this is an input binding, the data from the event hub comes into the function * `"connection": ""` - this defines the name of the setting to read the connection string from. When running locally, this will read this setting from the `local.settings.json` file. > 💁 The connection string cannot be stored in the `function.json` file, it has to be read from the settings. This is to stop you accidentally exposing your connection string. @@ -326,6 +326,10 @@ This will create a folder inside the `soil-moisture-trigger` folder called `iot- ### Task - run the event trigger +1. Make sure you are not running the IoT Hub event monitor. If this is running at the same time as the functions app, the functions app will not be able to connect and consume events. + + > 💁 Multiple apps can connect to the IoT Hub endpoints using different *consumer groups*. These are covered in a later lesson. + 1. To run the Functions app, run the following command from the VS Code terminal ```sh diff --git a/3-transport/lessons/2-store-location-data/README.md b/3-transport/lessons/2-store-location-data/README.md index f087f43..44f7769 100644 --- a/3-transport/lessons/2-store-location-data/README.md +++ b/3-transport/lessons/2-store-location-data/README.md @@ -341,6 +341,9 @@ The data will be saved as a JSON blob with the following format: [2021-05-21T01:31:14.351Z] Writing blob to gps-sensor/4b6089fe-ba8d-11eb-bc7b-1e00621e3648.json - {'device_id': 'gps-sensor', 'timestamp': '2021-05-21T00:57:53.878Z', 'gps': {'lat': 47.73092, 'lon': -122.26206}} ``` + > 💁 Make sure you are not running the IoT Hub event monitor at the same time. + + > 💁 You can find this code in the [code/functions](code/functions) folder. ### Task - verify the uploaded blobs diff --git a/3-transport/lessons/4-geofences/README.md b/3-transport/lessons/4-geofences/README.md index b071353..8bc8e88 100644 --- a/3-transport/lessons/4-geofences/README.md +++ b/3-transport/lessons/4-geofences/README.md @@ -324,6 +324,8 @@ When you create an IoT Hub, you get the `$Default` consumer group created by def geofence gps-sensor ``` +> 💁 When you ran the IoT Hub event monitor in an earlier lesson, it connected to the `$Default` consumer group. This was why you can't run the event monitor and an event trigger. If you want to run both, then you can use other consumer groups for all your function apps, and keep `$Default` for the event monitor. + ### Task - create a new IoT Hub trigger 1. Add a new IoT Hub event trigger to your `gps-trigger` function app that you created in an earlier lesson. Call this function `geofence-trigger`.