Skip to main content

Advanced Topics

This section covers advanced scenarios, deployment patterns, security hardening, and testing strategies for production applications built with Excalibur.Dispatch.

Before You Start​

Overview​

Once you've mastered the core concepts, these advanced topics help you build production-ready, secure, and scalable systems:

TopicDescriptionKey Features
SecuritySecurity hardening guideEncryption, authentication, authorization
DeploymentCloud-native deploymentKubernetes, Azure, AWS patterns
TestingTesting strategiesUnit, integration, conformance testing
Source GeneratorsAOT-compatible code generationHandler registry, JSON serialization, result factory
Native AOTNative AOT compilationZero-reflection dispatch, trimming, AOT publish
AOT Compatibility MatrixPer-package AOT status139/173 packages AOT-safe, blocking dependencies

Security Hardening​

The Security Guide covers:

  • Encryption: AES-256-GCM field-level encryption, key management
  • Authentication: JWT, OAuth 2.0, mTLS integration
  • Authorization: Interface-based access control (IRequireAuthorization)
  • Audit Logging: Tamper-evident hash chains, compliance logging
  • Secret Management: Azure Key Vault, AWS KMS, HashiCorp Vault

Deployment Patterns​

The Deployment Guide covers:

Kubernetes​

  • Health check endpoints (/health, /ready, /live)
  • ConfigMap and Secret management
  • Horizontal Pod Autoscaling (HPA)
  • Service mesh integration (Istio, Linkerd)

Azure​

  • Azure App Service deployment
  • Azure Functions integration
  • Azure Service Bus transport
  • Application Insights observability

AWS​

  • AWS Lambda deployment
  • Amazon SQS/SNS transport
  • AWS Secrets Manager integration
  • CloudWatch metrics and logging

Testing Strategies​

The Testing Guide covers:

  • Unit Testing: xUnit, Shouldly, FakeItEasy patterns
  • Integration Testing: TestContainers, real infrastructure
  • Conformance Testing: abstract conformance kits per provider contract
  • Shared Test Doubles: TestMessageContext, TestDispatcher

Test Double Reference​

Test DoubleLocationPurpose
TestMessageContextTests.SharedIMessageContext for unit tests
TestRoutingResultTests.SharedIRoutingResult stub
TestServiceProviderTests.SharedMinimal IServiceProvider

By Scenario​

I want to...Read...
Encrypt sensitive fieldsSecurity Guide - Encryption
Deploy to KubernetesDeployment Guide - Kubernetes
Write unit testsTesting Guide
Integrate with AzureDeployment Guide - Azure
Add audit loggingSecurity Guide - Audit Logging
Use source generators for AOTSource Generators
Publish with Native AOTNative AOT Guide

By Compliance Requirement​

RequirementDocumentation
SOC 2Compliance Checklist
GDPRCompliance Checklist
HIPAACompliance Checklist
FedRAMPCompliance Checklist

See Also​