Custom topics, filtering, and retries

Develop Azure Event-based and Message-based Solutions

Fiodar Sazanavets

Senior Software Engineer and Microsoft MVP

What you will learn

  • Event Grid Domains
  • Advanced filtering
  • Dead-lettering
    • Tune retry behavior

Event Grid Domain

Develop Azure Event-based and Message-based Solutions

Event Grid Domains

Event Grid Domain

Develop Azure Event-based and Message-based Solutions

Domain vs Custom Topic

Domain

  • Manage many isolated topics
  • Span across several:
    • Apps
    • Teams
    • Tenants
  • Keeps customers separated

Custom Topic

  • Stand-alone topic
  • Single-publisher scenario
  • Intended for a small set of consumers

Event Grid Domain

Event Grid Topic

Develop Azure Event-based and Message-based Solutions

Advanced filtering

  • Filters deliver only the events a subscriber cares about.

  • Subject prefix and suffix filters work well for path-like subjects.

    • For example, /sales/ or .jpg.
  • Events can also be filtered by event type.

  • Advanced filters support comparisons like greater than, less than, and contains.

  • Multiple filters are combined with logical AND for precise control.

Advanced filtering

Develop Azure Event-based and Message-based Solutions

Dead-lettering in Event Grid

  • Event Grid supports dead-lettering as a safety net.

  • If delivery fails after all retries, the event is not lost.

  • Undelivered events are written to a dead-letter storage container.

  • Failure context is stored to support inspection and auditing.

  • Events can be replayed later using a recovery workflow.

Event Grid dead lettering

Develop Azure Event-based and Message-based Solutions

Retries and back-offs

  • Event Grid uses exponential back-off when retrying deliveries.

  • The delay between retries increases after each failure.

  • Each event subscription has a configurable retry policy.

  • You can tune maximum delivery attempts and time to live (TTL).

  • Choose retry settings based on the impact of late or missed events.

Exponential back-offs

Develop Azure Event-based and Message-based Solutions

Delivery guarantees

Delivery guarantees

  • Event Grid provides at-least-once delivery.

  • Duplicates are possible, and global ordering is not guaranteed.

  • These guarantees apply to both system and custom events.

  • The difference is who owns the publisher.

  • With system events, Azure publishes the facts.

  • With custom events, you publish the facts and must handle deduplication yourself.

Develop Azure Event-based and Message-based Solutions

Let's practice!

Develop Azure Event-based and Message-based Solutions

Preparing Video For Download...