Enterprise Integration Patterns with Azure
Enterprise Integration Patterns with Azure

Part 5: Messaging Endpoints & System Management – Blog Series: Enterprise Integration Patterns with Azure

In this fifth part of the Enterprise Integration Patterns series, we’ll explore how applications connect to messaging infrastructure, how to manage those connections, and how to tap into the message flow for diagnostics and monitoring. These patterns play a crucial role in building robust, observable, and manageable integration architectures.


1. Service Activator

Scenario: Service Activator connects an application to a messaging system, allowing the application logic to be triggered by incoming messages.

📘 Use Case: In an HR system, whenever a new employee onboarding message arrives in a queue, an employee profile is automatically created in the ERP.

🔄 End-to-End Flow:

  • Onboarding system pushes a message to a Service Bus queue.
  • An Azure Function with Service Bus trigger processes the message and inserts data into the ERP.

⚙️ Component Roles:

  • Service Bus Queue: Holds onboarding requests.
  • Azure Function: Acts as the service activator.
  • ERP System: Target application to update.

🛠 Azure Implementation:

  • Use a Service Bus–triggered Azure Function or Logic App.
  • Add retry, DLQ handling, and error notification.
[Onboarding App] → [Service Bus Queue] → [Azure Function] → [ERP]

2. Polling Consumer

Scenario: A Polling Consumer repeatedly checks a message source for new data.

📘 Use Case: A finance reconciliation tool polls an SFTP server every hour to check for new bank statements.

🔄 End-to-End Flow:

  • Logic App runs on a schedule.
  • It connects to the SFTP location and checks for new files.
  • Files are downloaded and passed to downstream processors.

⚙️ Component Roles:

  • Logic App: Implements polling logic.
  • SFTP Storage: Source of financial files.
  • Function App: Parses or processes the file.

🛠 Azure Implementation:

  • Use Recurrence trigger + SFTP connector in Logic App.
  • Move processed files to an “archive” folder to avoid re-processing.
[Logic App Timer] → [SFTP Server] → [Function App] → [Finance System]

3. Event-Driven Consumer

Scenario: Reacts to new events/messages instead of polling.

📘 Use Case: A warehouse automation system listens for new orders arriving via Event Grid and kicks off the packing workflow instantly.

🔄 End-to-End Flow:

  • Front-end system emits an event to Event Grid.
  • Event Grid pushes the event to a Logic App subscriber.
  • Logic App initiates the packaging process.

⚙️ Component Roles:

  • Event Grid: Event broker.
  • Logic App or Function: Handles event-based processing.
  • Warehouse System: Fulfillment engine.

🛠 Azure Implementation:

  • Use Event Grid trigger in Logic App or Function App.
  • Define event subscriptions using filters.
[Order Created] → [Event Grid] → [Logic App] → [Warehouse System]

4. Competing Consumers

Scenario: Multiple consumers pull from a single message channel to scale out processing.

📘 Use Case: A high-throughput fraud detection system has several Azure Functions consuming messages from a queue in parallel.

🔄 End-to-End Flow:

  • Transactions flow into a Service Bus Queue.
  • Multiple Azure Functions with the same trigger read from it.
  • Each processes transactions independently.

⚙️ Component Roles:

  • Service Bus Queue: Central message buffer.
  • Azure Functions: Scalable consumers.
  • Fraud Engine: Analysis logic.

🛠 Azure Implementation:

  • Use Azure Function scale-out (consumption or premium plans).
  • Ensure idempotency of processing logic.
[Transactions] → [Service Bus Queue] → [Function A/B/C]

5. Message Endpoint

Scenario: A Message Endpoint abstracts messaging logic from business logic.

📘 Use Case: An API endpoint receives support tickets and forwards them into a ticketing queue for processing.

🔄 End-to-End Flow:

  • External systems POST to an API endpoint.
  • Azure API Management validates the request.
  • The Logic App sends it to a Service Bus Queue.

⚙️ Component Roles:

  • APIM: Secures and manages the endpoint.
  • Logic App: Handles business logic.
  • Service Bus: Enables async processing.

🛠 Azure Implementation:

  • Define endpoint in APIM.
  • Logic App processes and enqueues messages.
[Client App] → [API Management] → [Logic App] → [Service Bus Queue]

6. Smart Proxy

Scenario: A proxy that intercepts messages for monitoring, logging, or modification.

📘 Use Case: A security gateway logs API calls and enriches them with user data before forwarding.

🔄 End-to-End Flow:

  • Request hits APIM.
  • APIM adds context headers (e.g., user role).
  • Request forwarded to internal services.

⚙️ Component Roles:

  • API Management: Proxy and policy engine.
  • Logic App: Backend processor.
  • Azure Monitor: Log collection.

🛠 Azure Implementation:

  • Use APIM policies to log, modify headers, and call backend.
  • Integrate with Azure Monitor for observability.
[Client] → [APIM with Logging] → [Logic App] → [CRM System]

7. Wire Tap

Scenario: A non-intrusive way to inspect message flow without altering it.

📘 Use Case: A retail integration taps into order messages to monitor delivery SLAs.

🔄 End-to-End Flow:

  • Orders pass through Logic App.
  • A copy is sent to a monitoring system.

⚙️ Component Roles:

  • Logic App: Branches to main flow and tap.
  • Azure Monitor / Storage: Logs tap data.
  • Order System: Main receiver.

🛠 Azure Implementation:

  • Use “Parallel Branch” in Logic App.
  • One branch continues normal processing; another logs.
[Order Message]
↙️ ↘️
[Monitor] [Order Processor]

8. Detour

Scenario: Temporarily diverts message flow for testing or maintenance.

📘 Use Case: While the CRM system is under maintenance, customer updates are routed to a mock service.

🔄 End-to-End Flow:

  • Detour is enabled via config or switch.
  • Messages are routed to an alternative handler.

⚙️ Component Roles:

  • Logic App: Contains conditional routing logic.
  • Blob/Table Storage: Config source for detour.
  • Mock Service: Temporary endpoint.

🛠 Azure Implementation:

  • Use a config-driven Switch in Logic App.
  • Externalize flag to control routing path.
[Customer Update] → [Logic App (Switch)] → [CRM or Mock]

9. Control Bus

Scenario: Enables centralized management of distributed messaging systems.

📘 Use Case: A logistics platform enables/pauses specific integrations dynamically via a control signal.

🔄 End-to-End Flow:

  • Admin sends command to Control Topic.
  • Subscriber Logic Apps listen for enable/disable actions.
  • Integration flow toggles on/off.

⚙️ Component Roles:

  • Service Bus Topic: Broadcast control signals.
  • Logic Apps: Subscribe and act on commands.
  • Key Vault / Storage: Holds dynamic flags.

🛠 Azure Implementation:

  • Use Service Bus Topic control-bus.
  • Each Logic App checks “enabled” flag at runtime.
[Admin Portal] → [Control Topic] → [Integration Flows]

10. Test Message

Scenario: Sends test messages through integration pipelines to validate behavior.

📘 Use Case: A developer sends a dummy invoice message to verify that the entire billing flow executes correctly.

🔄 End-to-End Flow:

  • Test message is posted to Service Bus or HTTP endpoint.
  • Integration flow processes it.
  • Result is logged or returned.

⚙️ Component Roles:

  • Developer Tool: Sends test payload.
  • Logic App: Executes the real workflow.
  • Logger: Captures test results.

🛠 Azure Implementation:

  • Tag message with "isTest": true.
  • Use conditional logic to separate test vs. prod flow.
[Test Client] → [Service Bus] → [Logic App] → [Mock Billing]

11. Message Store

Scenario: Persists messages for replay, auditing, or recovery.

📘 Use Case: A compliance requirement mandates that all financial transactions be stored for 7 years.

🔄 End-to-End Flow:

  • Transaction processed by Logic App.
  • Message is stored in Blob with metadata.

⚙️ Component Roles:

  • Logic App: Processes and stores messages.
  • Blob Storage: Message archive.
  • Key Vault: Secures access keys.

🛠 Azure Implementation:

  • Use Logic App to write message to Blob.
  • Add correlation ID, timestamp in metadata.
[Message] → [Logic App] → [Blob Storage Archive]

✅ Up Next: Part 6 – Error Handling & Monitoring Patterns

We’ll cover Circuit Breaker, Throttler, Retry, Scheduler Agent, Message Expiry, and more patterns that help you build resilient and observable enterprise integrations.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *