Bitzu

AZ-305 ยท Application architecture design

Event Grid vs Event Hubs: events, streams and messages

Azure Event Grid (system and custom topics, push vs pull delivery, filtering, MQTT) vs Azure Event Hubs (high-throughput streams, partitions, consumer groups, Capture), events vs messages.

Key points

  • Event: change notice; message: contract with expected work (Service Bus).
  • Event Grid: serverless pub-sub; system and custom topics; namespaces: MQTT (v3.1.1, v5), pull delivery.
  • Push: webhooks, Functions, Event Hubs; 24-hour retry, dead-lettering, filters.
  • Event Hubs: millions of events/s; partitions (order per partition), consumer groups, checkpointed offsets.
  • Capture to Blob Storage or Data Lake (Avro); Kafka protocol.

Source: https://learn.microsoft.com/en-us/azure/service-bus-messaging/compare-messaging-services

Practice questions

Single choice

Which service is designed to ingest millions of telemetry events per second as a time-ordered stream for analytics?

  1. Azure Event Grid
  2. Azure Service Bus
  3. Azure Event Hubs
  4. Azure Queue Storage
Show answer

Answer: C. Azure Event Hubs

Azure Event Hubs is the big-data streaming and ingestion service, with partitions for parallel throughput. Event Grid routes discrete events reactively, and Service Bus is for transactional business messages.

Select all that apply

Which statements about Azure Event Hubs are correct?

  1. Events sharing a partition key stay in order within one partition
  2. Each consumer group reads the stream independently
  3. Capture can archive the stream to Blob Storage or Data Lake
  4. Event Hubs pushes each event to a webhook subscriber
  5. Order is guaranteed across all partitions of the hub
Show answer

Answer: A. Events sharing a partition key stay in order within one partition, B. Each consumer group reads the stream independently, C. Capture can archive the stream to Blob Storage or Data Lake

Events with the same partition key land in the same partition and keep their order there; each consumer group is an independent view with its own position; Capture archives the stream to Blob Storage or Data Lake Storage. Event Hubs consumers pull rather than receive pushes, and ordering is only per partition, not across the whole hub.

True or false

Azure Event Grid guarantees that events are delivered to subscribers in the order they were published.

Show answer

Answer: False

False. Event Grid gives at-least-once delivery with no ordering guarantee. If order matters, use Service Bus sessions (FIFO) or Event Hubs partitions (order per partition).

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-305 topics in this module