Volume 11 · Chapter 5 — Advanced Cloud Architecture, Azure Solution Architect & Enterprise Platform Engineering
Azure Integration Services
5.1 Introduction
Enterprises are webs of systems that must communicate reliably - services, partners, legacy platforms, and SaaS. Azure Integration Services provide the messaging, eventing, workflow, and API-management building blocks for that communication. The architect’s core skill here is choosing the right tool for each interaction, because Service Bus, Event Grid, Event Hubs, Logic Apps, and API Management solve genuinely different problems that are easy to confuse.
5.2 The Four Messaging/Eventing Services
The most common architect decision is which of Azure’s messaging services fits an interaction. The distinction is messages (work to be processed) versus events (notifications of facts), and discrete versus high-throughput streams.
| Service | Model | Use for |
|---|---|---|
| Service Bus | Enterprise messaging (queues/topics) | Reliable work & commands, ordering, transactions, DLQ |
| Event Grid | Discrete event routing (pub/sub) | Reactive notifications, serverless triggers, low latency |
| Event Hubs | High-throughput event streaming | Telemetry, IoT, logs, analytics ingestion, replay |
| Logic Apps | Workflow automation (connectors) | Business process orchestration, SaaS integration |
5.3 Service Bus for Reliable Messaging
Service Bus is the enterprise workhorse for reliable, ordered, transactional messaging: queues for competing-consumer work distribution, topics/subscriptions for pub/sub, sessions for per-entity ordering, dead-letter queues for poison messages, and duplicate detection. It is the right choice when delivery guarantees and message-processing semantics matter - as in payments.
// Publish reliably via the transactional outbox; consume idempotently with a session for ordering.
await using var sender = client.CreateSender("payments");
await sender.SendMessageAsync(new ServiceBusMessage(BinaryData.FromObjectAsJson(evt))
{
SessionId = accountId, // per-account ordering
MessageId = evt.PaymentId // enables duplicate detection / idempotency
});
5.4 Event Grid vs Event Hubs
Event Grid routes discrete events (a blob was created, a resource changed) to subscribers with low latency for reactive, serverless scenarios - it is aboutnotification. Event Hubs ingests massive streams of events (telemetry, transactions, logs) for analytics and processing, with retention and replay - it is aboutthroughput and streaming. Confusing them is a common design error: Event Grid is not for millions-per-second telemetry, and Event Hubs is not for routing a single “order placed” notification to a couple of handlers.
5.5 API Management
API Management is the governed front door for APIs: it publishes and secures APIs behind a gateway with authentication, authorization, rate limiting, transformation, caching, and analytics, plus a developer portal. It is how an enterprise exposes internal and partner APIs consistently and safely, decoupling consumers from backend implementations.
flowchart TB Consumers["Clients / Partners"] --> APIM["API Management\n(auth, rate limit, transform, analytics)"] APIM --> A["Payments API"] APIM --> B["Accounts API"] APIM --> C["Legacy SOAP service\n(transformed to REST)"]
5.6 Hybrid and Workflow Integration
Logic Apps orchestrate business workflows using hundreds of prebuilt connectors (SaaS, on-prem, Azure services), ideal for integration and automation that would otherwise be custom glue code. For hybrid scenarios, on-premises data gateways and Service Bus relay securely connect cloud workflows to systems behind the corporate firewall.
When would you use Service Bus versus Event Grid versus Event Hubs?
They solve different problems and the choice hinges on messages-versus-events and throughput. I use Service Bus for reliable enterprise messaging - discrete units of work or commands that must be processed with delivery guarantees, ordering (via sessions), transactions, dead-lettering, and duplicate detection - the classic example being payment processing where losing or double-handling a message is unacceptable. I use Event Grid for discrete event notification and reactive, serverless scenarios: routing “something happened” events (a blob created, a resource changed, an order placed) to one or more subscribers with low latency, to trigger functions or workflows - it is lightweight pub/sub for reacting to state changes. I use Event Hubs for high-throughput event streaming: ingesting massive volumes of events - telemetry, IoT, transaction streams, logs - for analytics and stream processing, with retention and replay so many consumers can read at their own pace. The common mistakes are using Event Grid for high-volume streaming (it is for discrete notifications, not millions/second telemetry) or Service Bus for analytics ingestion. So: Service Bus for reliable work and commands, Event Grid for reactive notifications, Event Hubs for streaming and analytics - and many systems use all three at different points.
What role does API Management play in an enterprise integration architecture?
API Management is the governed front door that decouples API consumers from backend implementations and enforces cross-cutting concerns consistently across all APIs. Instead of each backend service handling authentication, authorization, rate limiting, and so on itself and exposing its raw interface, APIM sits in front as a gateway that centralizes those concerns: validating tokens and enforcing auth policies, throttling and quota-limiting to protect backends and ensure fair use, transforming requests/responses (for example wrapping a legacy SOAP service as a clean REST API, or versioning), caching, and collecting analytics. It provides a developer portal so internal teams and external partners can discover, learn, and subscribe to APIs, and it lets the organization publish a consistent, secure, well-documented API surface while the backends evolve independently behind it. For a bank exposing account and payment APIs to partners, APIM enforces security and rate limits uniformly, hides internal topology, and gives an auditable, managed boundary. In short, APIM turns a collection of backend services into a governed, secure, consumable API product layer - it is the control point and abstraction between consumers and the enterprise’s internal services.
How do you design a reliable enterprise integration architecture on Azure?
I start by classifying each interaction and picking the right service, then layer in the reliability patterns. Interactions needing an immediate answer use synchronous APIs (through API Management, hardened with timeouts, retries, and circuit breakers); state changes and cross-system work use asynchronous messaging or eventing - Service Bus for reliable work and commands where delivery guarantees, ordering, and transactions matter; Event Grid for reactive discrete notifications; and Event Hubs for high-throughput streaming and analytics. For reliability I make eventing atomic with the transactional outbox so a state change and its message commit together, I make consumers idempotent because delivery is at-least-once, and I use dead-letter queues to isolate poison messages; ordering is preserved per entity via sessions/partitions rather than globally. Contracts (message, event, and API schemas) are explicit, versioned, and backward compatible so systems deploy independently, and legacy or partner systems are wrapped behind anti-corruption layers and API Management so their quirks do not leak inward. Workflow-style integration and SaaS connectivity use Logic Apps, and hybrid connections to on-prem go through secure gateways/relay. I expose the whole API surface through API Management for consistent security, throttling, and analytics, and I make every flow observable with correlation IDs and distributed tracing so a business transaction can be followed across every hop and stuck messages are visible. Security - authenticated, authorized, encrypted channels - is built in throughout. The result is integration that is loosely coupled where possible, reliable under failure, and governed and observable end to end.
5.7 Banking Enterprise Scenario
A bank uses each integration service for its strength. Payment work flows through Service Bus with sessions for per-account ordering, dead-letter queues for poison messages, and the transactional outbox for reliable publishing, consumed idempotently. Discrete events - a document uploaded, an account status changed - route through Event Grid to trigger serverless handlers. Real-time transaction and telemetry streams feed Event Hubs for fraud analytics with replay. Partner and internal APIs are all published through API Management, which enforces OAuth2, rate limits, and analytics and wraps a legacy SOAP core as clean REST. Logic Apps automate back-office workflows across SaaS systems, and every hop carries a correlation ID for tracing.
Chapter Revision Notes
- Choose the integration service by the interaction: messages vs events vs streams vs workflow.
- Service Bus for reliable, ordered, transactional work; make publishing atomic and consumers idempotent.
- Event Grid for reactive discrete notifications; Event Hubs for high-throughput streaming/analytics.
- API Management is the governed front door - centralizing auth, throttling, transformation, analytics.
- Logic Apps automate workflows and SaaS/hybrid integration; wrap legacy behind anti-corruption layers.