0
0
Azurecloud~20 mins

Event Grid subscriptions and filters in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Event Grid Filter Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Event Grid subscription filter behavior

You create an Event Grid subscription with a filter that only allows events where data.category equals "sales". Which events will be delivered to the subscriber?

AAll events will be delivered regardless of <code>data.category</code> value.
BOnly events with <code>data.category</code> exactly equal to "sales" will be delivered.
CEvents with <code>data.category</code> containing the word "sales" anywhere will be delivered.
DNo events will be delivered because filters do not support <code>data</code> properties.
Attempts:
2 left
💡 Hint

Think about how exact matching works in Event Grid filters.

Configuration
intermediate
2:00remaining
Event Grid advanced filter configuration

You want to create an Event Grid subscription that only receives events where data.amount is greater than 100 and data.region is either "US" or "EU". Which filter configuration achieves this?

AUse two advanced filters: one numeric filter for <code>data.amount &gt; 100</code> and one string filter with <code>In</code> operator for <code>data.region</code> in ["US", "EU"] combined with AND.
BUse a simple filter with <code>data.amount &gt; 100</code> and ignore <code>data.region</code>.
CUse a simple filter with <code>data.region</code> equals "US" or "EU" but no numeric filter.
DUse two filters combined with OR: one for <code>data.amount &gt; 100</code> and one for <code>data.region</code> in ["US", "EU"].
Attempts:
2 left
💡 Hint

Remember that multiple filters combined with AND require all conditions to be true.

Architecture
advanced
2:00remaining
Designing Event Grid subscriptions for multi-tenant filtering

You have an Event Grid topic publishing events for multiple tenants. You want each tenant to receive only their own events based on data.tenantId. What is the best architecture to achieve this with minimal subscriptions?

ACreate one subscription per tenant with a filter on <code>data.tenantId</code> matching the tenant's ID.
BCreate a single subscription without filters and let tenants filter events on their side.
CCreate one subscription with a filter that matches all tenant IDs using a wildcard.
DCreate one subscription per event type ignoring tenant filtering.
Attempts:
2 left
💡 Hint

Consider how Event Grid filters can isolate events per tenant.

security
advanced
2:00remaining
Securing Event Grid subscriptions with filters

You want to prevent unauthorized event delivery by ensuring only events with a specific subject prefix are delivered to your subscription. Which filter setup enforces this?

AUse a subject ends with filter with the required prefix.
BUse a filter on <code>data</code> properties ignoring the subject.
CUse no filters and rely on network security groups to block events.
DUse a subject begins with filter with the required prefix on the subscription.
Attempts:
2 left
💡 Hint

Think about how subject filters work in Event Grid.

Best Practice
expert
3:00remaining
Optimizing Event Grid subscription filters for cost and performance

You manage an Event Grid topic with thousands of event types and many subscriptions. To reduce cost and improve performance, which filtering strategy is best?

AUse multiple complex advanced filters on data properties for each subscription.
BUse no filters and filter events in subscriber applications.
CUse subject prefix filters to limit events per subscription instead of complex data property filters.
DCreate one subscription for all events and distribute filtering downstream.
Attempts:
2 left
💡 Hint

Consider the cost and latency impact of filtering at the Event Grid service versus subscriber side.