Home › Studies › AZ-305 › Infrastructure › Messaging & Events

Messaging & Events

Event Grid · Event Hubs · Service Bus · Storage Queues

Practice questions for this topic →

Pick the service

ServiceData modelUse when
Event GridDiscrete events (push)React to state changes: blob created, resource events, serverless handlers
Event HubsEvent streams (partitions, consumer groups)Telemetry, millions of events per second, real-time analytics, Kafka clients
Service BusHigh-value messagesOrders, payments, workflows: ordering, transactions, dead-letter, sessions
Storage QueuesSimple messagesCheap background work where losing a message just costs a rerun

Event vs message: an event is a lightweight notification of a state change and the publisher expects nothing in return. A message carries data under a contract between publisher and consumer.

Service Bus tiers

FeatureBasicStandardPremium
Queues✓✓✓
Topics / subscriptions—✓✓
Transactions, duplicate detection, sessions—✓✓
Max message size256 KB256 KB100 MB
Resource isolation, Geo-Replication, JMS 2.0——✓

Event Hubs tiers

TierMax retentionCaptureKafkaNotes
Basic1 day——One consumer group
Standard7 daysBilled separately✓Geo-DR; 40 throughput-unit threshold per namespace
Premium90 daysIncluded✓Resource isolation, customer-managed keys, geo-replication
Dedicated90 daysIncluded✓Single tenant, highest quotas

Tier can't be changed in place; you deploy a new namespace. Capacity is billed per namespace, so needing more than 40 TUs without a dedicated cluster means a new namespace.

Facts to know

Exam Tips

Tick each tip once you can answer it without looking.

“Trigger processing whenever a blob is uploaded” → Event Grid.

“Ingest millions of telemetry events per second” → Event Hubs.

“Messages must be processed in FIFO order / exactly once” → Service Bus with sessions (Standard or Premium). Trap: Storage Queues and Event Grid don't guarantee ordering.

“Publish once, many subscribers with filters, guaranteed delivery” → Service Bus topics. Trap: Basic tier has no topics.

“Messages larger than 256 KB (up to 100 MB)” → Service Bus Premium.

“Sender retries must not create duplicate messages” → Service Bus duplicate detection (MessageId within a time window). Trap: Not available on Basic.

“Existing Kafka producers must send to Azure with no code changes” → Event Hubs (Standard or higher). Trap: Basic doesn't support Kafka.

“Keep streaming data longer than 7 days” → Event Hubs Capture to Storage/ADLS, or Premium/Dedicated (90 days).

“Service Bus DR must preserve the messages themselves, not just config” → Service Bus Geo-Replication (Premium). Trap: Geo-Disaster Recovery replicates metadata only, and the two can't be combined.

“Simple, cheapest queue for background jobs; no ordering or dead-letter needed” → Storage Queues.

“Service Bus namespace promoted to its geo-replication secondary, with Event Grid integration” → Event Grid keeps running in the initial primary region. Trap: Removing the initial primary region from geo-replication breaks the integration.

“Event Hubs namespace would need more than 40 throughput units without a dedicated cluster” → Create a new namespace with its own capacity. Trap: Tier can't be changed in place.

“Event Hubs tiers that include Capture” → Premium and Dedicated include it; Standard bills it separately; Basic has none. Trap: Premium and Dedicated also keep events up to 90 days.

“Event versus message” → Event: notification of a state change, no expectation of handling. Message: data under a contract between publisher and consumer. Trap: Events fit Event Grid; messages fit Service Bus.

Sources

← Batch ProcessingAPI Management →