Exercise - Publish and subscribe to events in Azure Managed Redis

Completed

In this exercise, you deploy an Azure Managed Redis resource and complete a Python Flask web app that publishes and subscribes to Redis channels from a single page. You add code to connect to Redis with Microsoft Entra ID, publish event messages, broadcast to every channel, format received messages, listen for messages on a background thread, and subscribe to channels and patterns. You then run the app and watch messages arrive live as you publish them.

Tasks performed in this exercise:

  • Download the project starter files
  • Create an Azure Managed Redis resource
  • Add code to the starter files to complete the app
  • Run the app to publish and subscribe to messages

This exercise takes approximately 30-40 minutes to complete.

Before you start

To complete the exercise, you need:

Get started

Select the Launch Exercise button to open the exercise instructions in a new browser window. When you're finished with the exercise, return here to:

  • Complete the module
  • Earn a badge for completing this module

Button to launch exercise.