Advanced Topics
This section covers advanced scenarios, deployment patterns, security hardening, and testing strategies for production applications built with Excalibur.Dispatch.
Before You Start
- .NET 8.0+ (or .NET 9/10 for latest features)
- A working Dispatch application
- Completion of Getting Started and Core Concepts
Overview
Once you've mastered the core concepts, these advanced topics help you build production-ready, secure, and scalable systems:
| Topic | Description | Key Features |
|---|---|---|
| Security | Security hardening guide | Encryption, authentication, authorization |
| Deployment | Cloud-native deployment | Kubernetes, Azure, AWS patterns |
| Testing | Testing strategies | Unit, integration, conformance testing |
| Source Generators | AOT-compatible code generation | Handler registry, JSON serialization, result factory |
| Native AOT | Native AOT compilation | Zero-reflection dispatch, trimming, AOT publish |
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: 130+ compliance test kits
- Shared Test Doubles:
TestMessageContext,TestDispatcher
Test Double Reference
| Test Double | Location | Purpose |
|---|---|---|
TestMessageContext | Tests.Shared | IMessageContext for unit tests |
TestRoutingResult | Tests.Shared | IRoutingResult stub |
TestServiceProvider | Tests.Shared | Minimal IServiceProvider |
Quick Links
By Scenario
| I want to... | Read... |
|---|---|
| Encrypt sensitive fields | Security Guide - Encryption |
| Deploy to Kubernetes | Deployment Guide - Kubernetes |
| Write unit tests | Testing Guide |
| Integrate with Azure | Deployment Guide - Azure |
| Add audit logging | Security Guide - Audit Logging |
| Use source generators for AOT | Source Generators |
| Publish with Native AOT | Native AOT Guide |
By Compliance Requirement
| Requirement | Documentation |
|---|---|
| SOC 2 | Compliance Checklist |
| GDPR | Compliance Checklist |
| HIPAA | Compliance Checklist |
| FedRAMP | Compliance Checklist |
Related Documentation
- Core Concepts - Fundamental concepts
- Patterns - Common messaging patterns
- Migration Guides - Version upgrade guidance
- Compliance - Regulatory compliance
See Also
- Getting Started — Quick start guide for new users
- Core Concepts — Fundamental concepts including actions, handlers, and message context
- Source Generators Getting Started — Step-by-step guide to enabling source generators
- Performance Overview — Performance optimization strategies and benchmarks