Azure  

Important classes / objects you should know for Azure Service

Got it πŸ‘ You’re asking about important classes / objects you should know for interviews in Azure Service Bus, Event Hub, and Event Grid (mostly in .NET SDK context).

Here’s a developer-focused cheatsheet πŸ‘‡


πŸ”‘ Important Classes in Azure Messaging Services

🟒 Azure Service Bus (Queues & Topics)

Namespace: Azure.Messaging.ServiceBus

  • ServiceBusClient β†’ Entry point, create senders/receivers.

  • ServiceBusSender β†’ Send messages to queue/topic.

  • ServiceBusReceiver β†’ Receive messages from queue/subscription.

  • ServiceBusProcessor β†’ Event-driven message processing (background).

  • ServiceBusMessage β†’ Represents a message (body, headers, properties).

  • ServiceBusReceivedMessage β†’ Received message (with lock tokens, etc.).

  • ServiceBusMessageBatch β†’ Batch sending support.

  • ServiceBusSessionReceiver β†’ Receive session-enabled messages (FIFO).

  • ServiceBusAdministrationClient β†’ Manage queues, topics, subscriptions.

πŸ‘‰ Interview tip: Mention DLQ (Dead Letter Queue) via subPath + "/$DeadLetterQueue".


🟣 Azure Event Hub (Streaming)

Namespace: Azure.Messaging.EventHubs

  • EventHubProducerClient β†’ Send events to an Event Hub.

  • EventHubConsumerClient β†’ Receive events from an Event Hub.

  • EventData β†’ Represents a single event (body + metadata).

  • EventDataBatch β†’ Efficient batch sending.

  • PartitionContext β†’ Metadata about the partition being read.

  • ProcessEventArgs β†’ Context in event handler when consuming.

  • ProcessErrorEventArgs β†’ Error handling during processing.

  • EventProcessorClient (with Blob Storage Checkpointing) β†’

    • Handles multiple consumers

    • Maintains offsets & checkpoints.

πŸ‘‰ Interview tip: Stress that partitioning + checkpointing are core to Event Hub.


πŸ”΅ Azure Event Grid (Event Routing)

Namespace: Azure.Messaging.EventGrid

  • EventGridPublisherClient β†’ Send custom events to Event Grid.

  • EventGridEvent β†’ Schema for custom events.

  • CloudEvent β†’ Schema for CloudEvents standard (alternative to EventGridEvent).

  • EventGridSubscriber β†’ Handles event subscription in apps.

  • System Events β†’ Predefined classes for Azure services (e.g., StorageBlobCreatedEventData, ResourceWriteSuccessEventData).

πŸ‘‰ Interview tip: Emphasize two event models:

  • EventGridEvent (Azure native)

  • CloudEvent (CNCF standard).


πŸ“Š Summary Table

ServiceKey Classes (C# SDK)Focus Area
Service BusServiceBusClient, ServiceBusSender, ServiceBusReceiver, ServiceBusProcessor, ServiceBusMessage, ServiceBusAdministrationClientReliable messaging (queues, topics, DLQ)
Event HubEventHubProducerClient, EventHubConsumerClient, EventProcessorClient, EventData, EventDataBatchHigh-throughput streaming, partitions
Event GridEventGridPublisherClient, EventGridEvent, CloudEvent, EventGridSubscriberEvent routing, serverless triggers

⚑ Elevator Pitch (If asked directly)

  • In Service Bus, think in terms of messages and processors (ServiceBusClient, ServiceBusSender, ServiceBusReceiver).

  • In Event Hub, focus on events and streaming consumers (EventHubProducerClient, EventHubConsumerClient, EventProcessorClient).

  • In Event Grid, it’s about publishing and subscribing events (EventGridPublisherClient, EventGridEvent, CloudEvent).