Muokkaa

Jaa


Azure Cache for Redis Event Grid Overview

Azure Cache for Redis events, such as patching, scaling, import/export (RDB) events are pushed using Azure Event Grid to subscribers such as Azure Functions, Azure Logic Apps, or even to your own http listener. Event Grid provides reliable event delivery to your applications through rich retry policies and dead-lettering.

See the Azure Cache for Redis events schema article to view the full list of the events that Azure Cache for Redis supports.

If you want to try Azure Cache for Redis events, see any of these quickstarts:

If you want to use this tool: See this quickstart:
Azure portal Quickstart: Route Azure Cache for Redis events to web endpoint with the Azure portal
PowerShell Quickstart: Route Azure Cache for Redis events to web endpoint with PowerShell
Azure CLI Quickstart: Route Azure Cache for Redis events to web endpoint with Azure CLI

The event model

Event Grid uses event subscriptions to route event messages to subscribers. This image illustrates the relationship between event publishers, event subscriptions, and event handlers.

Event grid model.

First, subscribe an endpoint to an event. Then, when an event is triggered, the Event Grid service will send data about that event to the endpoint.

See the Azure Cache for Redis events schema article to view:

  • A complete list of Azure Cache for Redis events and how each event is triggered.
  • An example of the data the Event Grid would send for each of these events.
  • The purpose of each key value pair that appears in the data.

Best practices for consuming events

Applications that handle Azure Cache for Redis events should follow a few recommended practices:

  • As multiple subscriptions can be configured to route events to the same event handler, it is important not to assume events are from a particular source, but to check the topic of the message to ensure that it comes from the Azure Cache for Redis instance you are expecting.
  • Similarly, check that the eventType is one you are prepared to process, and do not assume that all events you receive will be the types you expect.
  • Azure Cache for Redis events guarantees at-least-once delivery to subscribers, which ensures that all messages are outputted. However, due to retries or availability of subscriptions, duplicate messages may occasionally occur. To learn more about message delivery and retry, see Event Grid message delivery and retry.

Next steps

Learn more about Event Grid and give Azure Cache for Redis events a try: