Azure Architecture Guide

CH20-05: Integration and Messaging Services

Goal

Integration services connect systems that do not run in the same process, team, boundary, or time window. The hard part is not sending data from one place to another. The hard part is choosing the right communication contract: command, event, stream, workflow, API boundary, or data movement.

The durable idea is:

Integration services should be chosen by communication meaning and failure behavior.

The Short Version

Start by naming what is being communicated:

Communication NeedCommon Azure Direction
Durable command or work itemAzure Service Bus queue or topic.
Notification that something happenedAzure Event Grid.
High-volume event streamAzure Event Hubs.
Business workflow or connector orchestrationAzure Logic Apps.
API gateway and policy boundaryAzure API Management.
Small integration glue or event handlerAzure Functions.
Data movement or pipeline orchestrationAzure Data Factory or Fabric Data Factory.

Service Reference

ServicePurposeUse WhenAvoid WhenCommon Prompt
Azure Service BusDurable messaging with queues and topics.Work must be stored until processed, consumers need retry behavior, or commands need reliable handoff.You only need lightweight event notification or high-volume telemetry ingestion.Is this durable work that must complete?
Azure Event GridEvent routing from publishers to subscribers.Services need to react when something happened, such as blob created, order placed, or resource changed.Consumers need durable queue semantics, ordered processing, or long-term stream ingestion.Is this a notification event?
Azure Event HubsHigh-throughput event streaming and ingestion.You need to ingest telemetry, clickstreams, logs, or high-volume event streams for analytics or processing.You need per-message command handling, workflow state, or business process orchestration.Is this a stream?
Azure Logic AppsWorkflow orchestration with connectors and visual/business process flow.You need integration steps, approvals, SaaS connectors, enterprise workflows, or long-running orchestration.A simple function or queue consumer is enough, or the workflow needs a fully custom runtime.Is this an integration workflow?
Azure API ManagementAPI gateway, policy, developer portal, and API boundary.APIs need authentication, throttling, versioning, transformation, subscription keys, or centralized policy.You only need internal code routing and no API product boundary.What API contract are we exposing?
Azure FunctionsEvent-driven integration code.You need a small handler for queue messages, events, timers, HTTP hooks, or glue logic.The integration has complex long-running state or needs explicit workflow visibility.Is this a small event-triggered unit?
Azure Data Factory / Fabric Data FactoryData movement and pipeline orchestration.You need to copy, transform, schedule, or orchestrate data movement between systems.You are processing real-time commands or durable business messages.Is this data pipeline movement?

Commonly Confused Services

ComparisonShort Answer
Service Bus vs Event GridService Bus stores durable work; Event Grid routes event notifications.
Service Bus vs Event HubsService Bus handles business messages and commands; Event Hubs ingests high-volume streams.
Event Grid vs Event HubsEvent Grid routes discrete events to subscribers; Event Hubs collects streams for processing and analytics.
Logic Apps vs FunctionsLogic Apps fits visible connector workflows; Functions fits code-based event handlers and glue.
API Management vs Application GatewayAPI Management governs API contracts and policies; Application Gateway controls regional web ingress and WAF.
Data Factory vs Service BusData Factory moves and orchestrates data pipelines; Service Bus protects durable work items.

Architecture Patterns

Integration services often appear in patterns such as:

  • Queue-based load leveling with Service Bus.

  • Publish-subscribe business messaging with Service Bus topics.

  • Event notification and fan-out with Event Grid.

  • Streaming ingestion with Event Hubs.

  • Enterprise workflow orchestration with Logic Apps.

  • API facade and policy boundary with API Management.

  • Event handler glue with Functions.

  • Batch or scheduled data movement with Data Factory or Fabric Data Factory.

Example: Order Processing

An order platform may use several integration services together. The checkout API publishes a durable command to Service Bus because order processing must complete even if the fulfillment service is temporarily unavailable. When an order changes state, Event Grid can notify interested subscribers. Clickstream events flow into Event Hubs for analytics. A partner return workflow may run in Logic Apps because it needs connectors, approvals, retries, and visible workflow state. External seller APIs may sit behind API Management.

That is not overengineering if each service owns a distinct communication responsibility.

Cloud Comparison

AWS and GCP users can use service comparisons as vocabulary bridges, but be careful. Event routing, durable queues, pub-sub messaging, stream ingestion, API gateways, and workflow orchestration exist across clouds, but the failure semantics differ. The design question should always ask what happens when the consumer is down, the event is duplicated, the workflow is partially complete, or the stream volume spikes.

Common Mistakes

  • Treating every asynchronous message as the same kind of communication.

  • Using Event Grid when work must be stored until processed.

  • Using queues for high-volume analytics streams.

  • Building workflow state manually when workflow orchestration is the real need.

  • Exposing APIs directly without throttling, versioning, or policy boundaries.

  • Treating data movement pipelines as operational command processing.

If Someone Asks You

How do Azure integration services differ?

A good answer is:

Choose by communication meaning and failure behavior. Service Bus stores durable work and business messages. Event Grid routes notifications that something happened. Event Hubs ingests high-volume streams. Logic Apps orchestrates workflows and connectors. API Management governs API boundaries. Functions can provide small event handlers, and Data Factory or Fabric Data Factory handles data movement pipelines.

What You Should Remember

First name the communication contract: command, event, stream, workflow, or API boundary.

Questions to Check Understanding

  1. How is Service Bus different from Event Grid?

  2. How is Event Hubs different from a queue?

  3. When does Logic Apps fit better than hand-built integration code?