In this assignment, you're going to add a Dapr input binding in the TrafficControlService to receive entry- and exit-cam messages over the MQTT protocol.
In this assignment you're going to focus on Dapr input bindings. See below for a diagram of how input bindings work:
For this hands-on assignment, this is all you need to know about input bindings. If you want to get more detailed information, read the introduction to this building block in the Dapr documentation.
To complete this assignment, you must reach the following goals:
- The TrafficControlService uses the Dapr MQTT input binding to receive entry- and exit-cam messages over the MQTT protocol.
- The MQTT binding uses the lightweight MQTT message broker Mosquitto that runs as part of the solution in a Docker container.
- The Camera Simulation publishes entry- and exit-cam messages to the MQTT broker.
This assignment targets number 5 in the end-state setup:
Open the source code folder in VS Code. Then open the Bindings documentation and start hacking away. As MQTT broker, you can use the lightweight MQTT broker Mosquitto.
To get step-by-step instructions to achieve the goals, open the step-by-step instructions:
Make sure you stop all running processes and close all the terminal windows in VS Code before proceeding to the next assignment.
Go to assignment 7.