About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_tools
⚠️
windows_first
Summary:
The documentation provides both Azure CLI and PowerShell examples for configuring dead-letter and retry policies in Azure Event Grid. However, PowerShell (a Windows-centric tool) is given equal prominence to Azure CLI, and there are explicit references to installing Azure PowerShell, which is most commonly used on Windows. There are no Linux shell-specific examples (e.g., Bash scripting), and the sample application linked is .NET-based, which is also more common in Windows environments. The documentation does not mention or demonstrate Linux-native tools or workflows, and PowerShell is presented as a primary automation option alongside Azure CLI.
Recommendations:
- Add explicit Bash shell examples for all CLI commands, demonstrating variable assignment and command usage in a Linux context.
- Clarify that Azure CLI is fully cross-platform and can be used on Linux, macOS, and Windows, and provide installation links for all platforms.
- De-emphasize PowerShell as a primary automation tool by placing Azure CLI (and Bash) examples before PowerShell examples.
- Include sample applications or links for other languages and platforms (e.g., Python, Node.js) that are popular in Linux environments.
- Mention that all features described are available and supported on Linux, and provide troubleshooting tips for common Linux-specific issues if any.
Create pull request
Flagged Code Snippets
> [!NOTE]
> If you set both `event-ttl` and `max-deliver-attempts`, Event Grid uses the first to expire to determine when to stop event delivery. For example, if you set 30 minutes as time-to-live (TTL) and 5 max delivery attempts. When an event isn't delivered after 30 minutes (or) isn't delivered after five attempts, whichever happens first, the event is dead-lettered. If you set max delivery attempts to 10, with respect to [exponential retry schedule](delivery-and-retry.md#retry-schedule), max six number of delivery attempts happen before 30 minutes TTL will be reached, therefore setting max number of attempts to 10 will have no impact in this case and events will be dead-lettered after 30 minutes.
### PowerShell
To set the event time-to-live to a value other than 1440 minutes, use:
To turn off dead-lettering, rerun the command to create the event subscription but don't provide a value for `deadletter-endpoint`. You don't need to delete the event subscription.
> [!NOTE]
> If you're using Azure CLI on your local machine, use Azure CLI version 2.0.56 or greater. For instructions on installing the latest version of Azure CLI, see [Install the Azure CLI](/cli/azure/install-azure-cli).
### PowerShell
To turn off dead-lettering, rerun the command to create the event subscription but don't provide a value for `DeadLetterEndpoint`. You don't need to delete the event subscription.
> [!NOTE]
> If you're using Azure PowerShell on your local machine, use Azure PowerShell version 1.1.0 or greater. Download and install the latest Azure PowerShell from [Azure downloads](https://azure.microsoft.com/downloads/).
## Set retry policy
When creating an Event Grid subscription, you can set values for how long Event Grid should try to deliver the event. By default, Event Grid tries for 24 hours (1,440 minutes), or 30 times. You can set either of these values for your Event Grid subscription. The value for event time-to-live must be an integer from 1 to 1440. The value for max retries must be an integer from 1 to 30.
You can't configure the [retry schedule](delivery-and-retry.md#retry-schedule).
### Azure portal
While creating an event subscription, you can configure retry policy settings on the **Additional features** tab.
:::image type="content" source="./media/manage-event-delivery/retry-policy-settings.png" alt-text="Screenshot showing the retry policy configuration of an event subscription.":::
You can also configure retry policy settings for an existing event subscription. On the **Event Subscription** page of your event subscription, switch to the **Additional features** tab to see the retry policy settings as shown in the following image.
:::image type="content" source="./media/manage-event-delivery/retry-policy-settings-existing-subscription.png" alt-text="Screenshot showing the retry policy configuration of an existing event subscription.":::
### Azure CLI
To set the event time-to-live to a value other than 1440 minutes, use: