Skip to main content

Integration Patterns

Grand Central implements industry-standard integration patterns based on Enterprise Integration Patterns (EIP) by Gregor Hohpe and Bobby Woolf. These patterns provide proven solutions for common integration challenges in banking environments.

Pattern Categories

Message Construction

Patterns for creating and structuring messages in integration flows

Message Routing

Patterns for directing messages to appropriate destinations

Message Transformation

Patterns for converting data between different formats and structures

System Integration

Patterns for connecting external systems and managing endpoints

Core Integration Patterns

Point-to-Point and Publish-Subscribe MessagingPoint-to-Point enables direct communication between systems through dedicated channels. Use case: Direct channel for payment processing where messages flow sequentially from source to core banking payment processor to payment notification. Benefits include simple and direct communication, guaranteed message delivery, easy implementation, and lower latency for direct connections.
# Direct channel for payment processing
from:
  uri: "direct:payment-request"
steps:
  - to: "kamelet:core-banking-payment"
  - to: "kamelet:payment-notification"
Publish-Subscribe broadcasts events to multiple subscribers simultaneously. Use case: Event broadcasting for account updates where account events multicast to audit service, notification service, and analytics service concurrently. Benefits include loose coupling between systems, easy addition of new subscribers, event-driven architecture support, and scalable message distribution.
# Event broadcasting for account updates
from:
  uri: "kamelet:account-events"
steps:
  - multicast:
      to:
        - "kamelet:audit-service"
        - "kamelet:notification-service"
        - "kamelet:analytics-service"
Building and Structuring MessagesMessage Translator converts between different data formats. Use case: ISO 20022 XML messages are unmarshalled, transformed through Groovy scripts filtering pacs.008 message types and mapping payment information fields (ID, amount, currency), then marshalled to JSON for internal payment processor consumption. Banking applications include ISO 20022 to internal format conversion, legacy system data transformation, API response formatting, and regulatory reporting format conversion.
from:
  uri: "kamelet:iso20022-source"
steps:
  - unmarshal:
      xml: {}
  - transform:
      groovy: |
        body.findAll { it.msgType == 'pacs.008' }
          .collect { payment ->
            [
              id: payment.pmtInf.pmtInfId,
              amount: payment.pmtInf.pmtMtd.instdAmt.value,
              currency: payment.pmtInf.pmtMtd.instdAmt.ccy
            ]
          }
  - marshal:
      json: {}
  - to: "kamelet:payment-processor"
Content Enricher adds additional data to messages during processing. Use case: Payment requests are enriched sequentially through customer lookup and account validation services before proceeding to payment processing. Banking applications include customer data enrichment, account balance validation, fraud score calculation, and risk assessment data addition.
from:
  uri: "kamelet:payment-request"
steps:
  - enrich:
      uri: "kamelet:customer-lookup"
      strategy: "#enrichmentStrategy"
  - enrich:
      uri: "kamelet:account-validation"
      strategy: "#accountEnrichment"
  - to: "kamelet:payment-processing"
Intelligent Message DirectionContent-Based Router routes messages based on message content through conditional logic. Use case: Payment intake evaluates amount (>$10,000 routes to high-value processor) and currency (USD routes to domestic processor) with fallback to standard payment processor. Banking applications include high-value payment routing, currency-specific processing, risk-based routing, and regulatory compliance routing.
from:
  uri: "kamelet:payment-intake"
steps:
  - choice:
      when:
        - simple: "${body[amount]} > 10000"
          steps:
            - to: "kamelet:high-value-payment-processor"
        - simple: "${body[currency]} == 'USD'"
          steps:
            - to: "kamelet:domestic-payment-processor"
      otherwise:
        steps:
          - to: "kamelet:standard-payment-processor"
Recipient List dynamically routes messages to multiple endpoints based on runtime conditions. Use case: Transaction events conditionally route to fraud detection (amount > $1,000), compliance checks (international transactions), and always to transaction logging through dynamically constructed recipient lists. Banking applications include multi-system notifications, conditional processing pipelines, regulatory reporting distribution, and event broadcasting.
from:
  uri: "kamelet:transaction-event"
steps:
  - setHeader:
      name: "recipients"
      groovy: |
        def recipients = []
        if (body.amount > 1000) recipients << 'kamelet:fraud-detection'
        if (body.type == 'international') recipients << 'kamelet:compliance-check'
        recipients << 'kamelet:transaction-log'
        return recipients.join(',')
  - recipientList:
      simple: "${header.recipients}"
Data Format and Structure ConversionMessage Filter selectively processes messages based on criteria. Use case: Transaction streams filter for completed status and amounts greater than $100 before forwarding to analytics, discarding messages that don’t meet criteria. Banking applications include completed transaction processing, error message filtering, customer segment filtering, and regulatory threshold filtering.
from:
  uri: "kamelet:transaction-stream"
steps:
  - filter:
      simple: "${body[status]} == 'COMPLETED' && ${body[amount]} > 100"
  - to: "kamelet:transaction-analytics"
Normalizer converts diverse data formats to common structure. Use case: Multi-format intake processes XML files (unmarshal, transform to common structure) and CSV files (unmarshal, transform to common structure) through format-specific paths, then marshals all to unified JSON format for consistent downstream processing. Banking applications include multi-format transaction ingestion, legacy system data normalization, partner data standardization, and regulatory report consolidation.
from:
  uri: "kamelet:multi-format-intake"
steps:
  - choice:
      when:
        - simple: "${header.CamelFileName} ends with '.xml'"
          steps:
            - unmarshal:
                xml: {}
            - transform:
                groovy: "transform.xmlToCommon(body)"
        - simple: "${header.CamelFileName} ends with '.csv'"
          steps:
            - unmarshal:
                csv: {}
            - transform:
                groovy: "transform.csvToCommon(body)"
  - marshal:
      json: {}
  - to: "kamelet:unified-processor"
External System Connection PatternsGateway Pattern provides single entry point for external access with routing logic. Use case: API gateway evaluates endpoint headers to route /payments requests to payment service and /accounts requests to account service, returning 404 for unknown endpoints. Banking applications include API gateway for mobile apps, partner system integration, microservices orchestration, and protocol translation.
from:
  uri: "kamelet:api-gateway"
steps:
  - choice:
      when:
        - simple: "${header.endpoint} == '/payments'"
          steps:
            - to: "kamelet:payment-service"
        - simple: "${header.endpoint} == '/accounts'"
          steps:
            - to: "kamelet:account-service"
      otherwise:
        steps:
          - setBody:
              constant: "Unknown endpoint"
          - setHeader:
              name: "CamelHttpResponseCode"
              constant: 404
Adapter Pattern connects incompatible systems through data transformation. Use case: Legacy mainframe adapter transforms modern REST JSON to fixed-width format (padded account numbers, formatted amounts), calls mainframe via 3270 protocol, then transforms fixed-width response back to JSON with parsed status, balance, and timestamp fields. Banking applications include core banking system integration, legacy application modernization, protocol bridging, and data format adaptation.
# Legacy mainframe adapter
from:
  uri: "kamelet:modern-api-request"
steps:
  - transform:
      groovy: |
        // Convert REST JSON to fixed-width format
        String accountNumber = body.accountNumber.padRight(16)
        String amount = String.format("%012d", (body.amount * 100) as Long)
        return accountNumber + amount + body.transactionType
  - to: "kamelet:mainframe-connector?protocol=3270"
  - transform:
      groovy: |
        // Convert fixed-width response back to JSON
        [
          status: body.substring(0, 2),
          balance: (body.substring(2, 14) as Long) / 100,
          timestamp: new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'")
        ]
  - marshal:
      json: {}
Robust Error ManagementDead Letter Channel handles failed message processing through retry and isolation mechanisms. Use case: Payment processing attempts delivery to core banking payment system with dead letter channel configured for 3 maximum redeliveries (5-second delays), capturing error timestamp and original endpoint on failure before routing to payment errors queue. Banking applications include payment processing failures, transaction rollback scenarios, system unavailability handling, and data quality issues.
from:
  uri: "kamelet:payment-processing"
errorHandler:
  deadLetterChannel:
    deadLetterUri: "kamelet:payment-errors"
    maximumRedeliveries: 3
    redeliveryDelay: 5000
    onPrepareFailure:
      - setHeader:
          name: "error-timestamp"
          simple: "${date:now:yyyy-MM-dd HH:mm:ss}"
      - setHeader:
          name: "original-endpoint"
          simple: "${routeId}"
steps:
  - to: "kamelet:core-banking-payment"
Circuit Breaker prevents cascade failures by monitoring external service health. Use case: External service calls implement circuit breaker with threshold of 5 failures, 10-second timeout, and fallback to cached responses or temporary unavailability messages when circuit opens. Banking applications include external service protection, third-party API reliability, system overload prevention, and graceful degradation.
from:
  uri: "kamelet:external-service-call"
steps:
  - circuitBreaker:
      configuration:
        threshold: 5
        timeout: 10000
        fallback:
          - setBody:
              constant: "Service temporarily unavailable"
          - to: "kamelet:fallback-cache-lookup"
  - to: "kamelet:external-banking-api"

Banking-Specific Patterns

Payment Processing Patterns

Multi-Stage Payment Processing handles complex payment workflows with validation, enrichment, and processing stages through coordinated pipeline execution. Payment Orchestration coordinates multiple systems for payment completion including validation, fraud detection, and settlement processes to ensure reliable transaction processing. Cross-Border Processing manages international payment workflows with currency conversion, compliance checks, and correspondent banking integration for global payment support. Real-Time Payments implements instant payment processing with immediate settlement and notification patterns for modern payment network requirements.

Account Management Patterns

Account Lifecycle Management provides end-to-end account processing from onboarding to closure through standardized workflow patterns. Customer Onboarding handles multi-step customer verification, documentation, and account setup processes ensuring regulatory compliance and data accuracy. KYC/AML Integration implements Know Your Customer and Anti-Money Laundering compliance workflows with automated screening and verification processes. Account Synchronization maintains real-time account data synchronization across multiple systems and channels ensuring data consistency and availability.

Regulatory Compliance Patterns

Regulatory Reporting automates compliance reporting and data collection patterns through standardized aggregation and submission workflows. Transaction Monitoring provides real-time transaction monitoring for suspicious activity detection with automated alerting and case management. Audit Trail Generation creates comprehensive audit logging and trail generation for regulatory requirements ensuring complete transaction traceability. Data Privacy Compliance implements GDPR and privacy regulation compliance patterns for data handling including data minimization and retention policies.

Risk Management Patterns

Real-Time Risk Assessment enables continuous risk evaluation and response patterns through integrated scoring and decision engines. Fraud Detection integrates machine learning for real-time fraud detection and prevention with adaptive scoring models and automated responses. Credit Risk Assessment aggregates multi-source credit data and implements risk scoring workflows for lending and exposure management decisions. Operational Risk Monitoring tracks system health and operational risk through comprehensive monitoring and assessment patterns ensuring service reliability.

Pattern Implementation Examples

Complete Implementation Example
# High-value payment processing with multiple validation stages
- route:
    id: "high-value-payment-processing"
    from:
      uri: "kamelet:payment-intake"
      parameters:
        queue: "high-value-payments"
    steps:
      # Initial validation
      - filter:
          simple: "${body[amount]} >= 10000"
      
      # Customer verification
      - enrich:
          uri: "kamelet:customer-verification"
          strategy: "#customerEnrichmentStrategy"
      
      # Fraud detection
      - to: "kamelet:fraud-detection-ml"
      - filter:
          simple: "${header[fraudScore]} < 0.8"
      
      # Compliance check
      - choice:
          when:
            - simple: "${body[isInternational]} == true"
              steps:
                - to: "kamelet:aml-screening"
                - to: "kamelet:sanctions-check"
      
      # Core banking processing
      - to: "kamelet:core-banking-payment"
      
      # Confirmation and notification
      - multicast:
          to:
            - "kamelet:payment-confirmation"
            - "kamelet:audit-log"
            - "kamelet:customer-notification"
Key Features:
  • Multi-stage validation pipeline
  • Risk-based routing decisions
  • Parallel processing for efficiency
  • Comprehensive audit trail
  • Error handling and rollback capabilities
Event-Driven Synchronization Pattern
# Real-time account synchronization across systems
- route:
    id: "account-sync-orchestrator"
    from:
      uri: "kamelet:account-events"
    steps:
      # Event filtering and validation
      - filter:
          simple: "${body[eventType]} in 'CREATED,UPDATED,CLOSED'"
      
      # Transform to canonical format
      - transform:
          groovy: |
            [
              accountId: body.accountId,
              customerId: body.customerId,
              eventType: body.eventType,
              timestamp: body.timestamp,
              accountData: body.accountData,
              changeLog: body.changeLog
            ]
      
      # Parallel synchronization to multiple systems
      - multicast:
          parallelProcessing: true
          streaming: true
          to:
            - "direct:sync-crm"
            - "direct:sync-analytics"
            - "direct:sync-mobile-app"
            - "direct:sync-web-banking"
      
      # Completion notification
      - to: "kamelet:sync-completion-log"

# Individual sync routes
- route:
    id: "sync-crm"
    from:
      uri: "direct:sync-crm"
    steps:
      - transform:
          groovy: "transform.toCrmFormat(body)"
      - to: "kamelet:crm-system-update"
      - to: "kamelet:sync-status-tracker?system=CRM"
Key Features:
  • Event-driven architecture
  • Parallel processing for performance
  • System-specific transformations
  • Completion tracking
  • Failure isolation

Pattern Selection Guide

By Use Case

Data Integration patterns support connecting systems with different data formats or data enhancement needs. Best patterns include Message Translator for format conversion, Content Enricher for data augmentation, and Normalizer for structure standardization. Use when connecting systems with different data formats or need data enhancement. Event Processing patterns enable event-driven architectures and real-time processing systems. Best patterns include Publish-Subscribe for event distribution, Content-Based Router for conditional routing, and Message Filter for selective processing. Use when building event-driven architectures or real-time processing systems. System Modernization patterns facilitate legacy system integration and architectural migration. Best patterns include Adapter for system compatibility, Gateway for unified access, and Anti-Corruption Layer for domain isolation. Use when integrating legacy systems or migrating to modern architectures. High-Volume Processing patterns handle large transaction volumes efficiently. Best patterns include Competing Consumers for parallel processing, Message Channel for reliable delivery, and Load Balancer for distribution. Use when processing large volumes of transactions or data.

By Complexity

Simple Patterns suit straightforward integrations with small teams and quick implementations. Examples include Point-to-Point Channel for direct communication, Message Filter for selection logic, and Content-Based Router for basic routing decisions. Moderate Patterns handle multi-step processing and data transformation needs with moderate complexity. Examples include Content Enricher for data augmentation, Message Translator for format conversion, and Recipient List for dynamic routing. Complex Patterns address long-running workflows, distributed transactions, and advanced orchestration requirements. Examples include Process Manager for workflow coordination, Saga for distributed transaction management, and Event Sourcing for state reconstruction.

Performance Considerations

High Throughput scenarios should use streaming patterns, async processing, and batch operations. Avoid synchronous request-reply patterns for high volumes and excessive transformations that impact throughput. Low Latency requirements benefit from direct channels, caching patterns, and connection pooling. Avoid multiple hops, complex routing logic, and heavy transformations that add latency. High Availability demands circuit breaker patterns, retry mechanisms, and failover capabilities. Avoid single points of failure, tight coupling, and synchronous dependencies that reduce availability.

Best Practices

Pattern Selection

  • Start with simple patterns and add complexity as needed
  • Consider future maintenance and evolution requirements
  • Evaluate performance implications early
  • Choose patterns that match team expertise

Implementation Guidelines

  • Document pattern decisions and rationale
  • Implement comprehensive error handling
  • Include monitoring and observability
  • Test patterns under realistic load conditions

Next Steps