Get startedGet started for free

Custom topics, filtering, and retries

1. Custom topics, filtering, and retries

In this video, you'll move beyond the basics of Azure Event Grid.

2. What you will learn

You will learn how to organize large publisher scenarios with Domains, cut noise with advanced filters, protect yourself with dead-lettering, and tune retry behavior.

3. Event Grid Domains

Imagine you have a system with many different types of clients: mobile applications spread across different countries, IoT devices, servers, etc. and all of them are emitting events. How do you manage such a complex setup? The answer is Event Grid Domains.

4. Domain vs Custom Topic

A Domain gives a publisher a single, centralized surface to manage many isolated domain topics, often per app, team, or tenant. You can delegate access per domain topic, apply role-based control, and keep each consumer's subscriptions cleanly separated. By contrast, a custom topic is a standalone topic you create for a single publisher scenario. Use a Domain when you need thousands of logically isolated topics under one roof and clear ownership boundaries; use a custom topic when one app publishes to a small set of consumers.

5. Advanced filtering

Next, there's advanced filtering. Filters let you deliver only what subscribers care about. Subject prefix and suffix filters are great for path-like subjects. For example, a sales department can apply the "/sales/" path filter, or an image-processing system can apply the ".jpg" filter so it doesn't receive any non-image files. You can also filter by event type and by properties inside the event data. Advanced filters support comparisons such as "greater than", "less than", and "contains", so you can keep only high-value events. Multiple filters are combined with logical AND, giving you precise control without custom code.

6. Dead-lettering in Event Grid

Just like Service Bus, Event Grid has dead-lettering as its safety net. If Event Grid can't get a success response from the destination after exhausting retries, it can write the undelivered event to a dead-letter storage container, along with context about why delivery failed. That keeps the happy path clear, gives you an audit trail, and lets you inspect and replay later via a separate recovery workflow.

7. Retries and back-offs

Event Grid uses exponential back-off to deliver events, where the gap between retries increases with the number of retries. On each event subscription, you can tune the retry policy, for example, the maximum delivery attempts and the total time to live (TTL). Short-lived signals might use a smaller TTL to avoid stale processing; critical business events might tolerate more attempts to ride out transient failures. Choose values that match the consequence of late or missed delivery.

8. Delivery guarantees

Finally, let's look at delivery guarantees. Event Grid provides at-least-once delivery: duplicates are possible, and global ordering isn’t guaranteed. These semantics are the same for system events and custom events. The difference isn’t in the guarantee. It’s in who owns the publisher. With system events, Azure produces the facts; with custom events, you do. Therefore, it's up to you to handle any deduplication.

9. Let's practice!

Let's dive in and practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.