Practical recipes for MuleSoft developers — DataWeave patterns, error handling, performance tuning, AI agent integration, API management, CI/CD pipelines, migration guides, Salesforce integration, cost optimization, troubleshooting, enterprise architecture, messaging, and connector patterns.
| Section | What You Get | Recipes |
|---|---|---|
| DataWeave | Transformation patterns, Exchange modules, cheatsheet, anti-patterns | 102 |
| Error Handling | Global handlers, retry/circuit breaker, DLQ, transactions, notifications | 51 |
| Performance | Streaming, memory tuning, batch optimization, caching, thread pools | 49 |
| API Management | Flex Gateway, custom policies, rate limiting, security, governance | 57 |
| AI Agents | MCP, A2A, RAG, Agentforce, inference, Vibes, AI testing, AI gateway | 63 |
| DevOps | CI/CD pipelines, IaC, secrets, deployment, testing, observability | 53 |
| Migrations | Java versions, runtime upgrades, CloudHub, connectors, architecture | 63 |
| Cost Optimization | vCore sizing, API consolidation, license audit, TCO comparison | 7 |
| Salesforce | Bidirectional sync, Bulk API, CDC, Agentforce, OAuth, Composite API | 9 |
| Troubleshooting | Thread dumps, OOM debugging, error decoding, deployment failures | 8 |
| Architecture | API-led patterns, C4E, event-driven, DR strategy, maturity model | 8 |
| Messaging | Anypoint MQ vs Kafka, FIFO, DLQ replay, circuit breaker, ordering | 7 |
| Connectors | SAP, Workday, ServiceNow, NetSuite, EDI, SFTP, AS2, database CDC | 8 |
Pick a section from the table above, or jump straight to the most popular content:
%dw 2.0
output application/json
---
payload filter $.status == "active"
map {
name: $.firstName ++ " " ++ $.lastName,
email: lower($.email)
}Browse all 102 patterns: dataweave/
| Category | Patterns | Difficulty |
|---|---|---|
| Array Manipulation | 9 | Beginner to Advanced |
| Object Transformation | 7 | Beginner to Advanced |
| String Operations | 6 | Beginner to Intermediate |
| Type Coercion | 4 | Beginner to Advanced |
| XML Handling | 7 | Intermediate to Advanced |
| CSV Operations | 4 | Beginner to Intermediate |
| Error Handling | 6 | Beginner to Advanced |
| Date/Time | 4 | Beginner to Intermediate |
| Advanced Patterns | 9 | Advanced |
| Real-World Mappings | 6 | Intermediate to Advanced |
| Security & Encoding | 7 | Intermediate to Advanced |
| API Response Patterns | 5 | Intermediate to Advanced |
| Flat File / Fixed Width | 4 | Intermediate to Advanced |
| Lookup & Enrichment | 4 | Intermediate to Advanced |
| Performance Optimization | 6 | Advanced |
| Event-Driven | 2 | Advanced |
| Math & Precision | 2 | Intermediate |
| Observability | 2 | Intermediate |
| AI Integration | 2 | Advanced |
| Utility Modules | 5 | Intermediate to Advanced |
- DW 2.x Cheatsheet | PDF
- Anti-Patterns & Common Mistakes
- DW 1.0 to 2.0 Migration Guide
- MEL to DataWeave Guide
- 7 Exchange Modules (96 functions, 213 MUnit tests)
- Playground Tips
Global handlers, retry patterns, circuit breaker, dead letter queues, async errors, transactions, connector-specific errors, alerting, validation, and recovery patterns.
Browse all error handling recipes
Streaming strategies, memory/heap tuning, batch optimization, connection pools, caching, threading model, API performance, database tuning, CloudHub sizing, HTTP/2 multiplexing, and monitoring.
Browse all performance recipes
Flex Gateway deployment, AI gateway, custom WASM policies, rate limiting, OAuth/JWT/mTLS security, OWASP API Top 10 mapping, MCP/A2A gateway, agent governance, API design patterns, versioning, and analytics.
Browse all API management recipes
MCP server/client setup, A2A protocol, advanced MCP (OAuth, streaming, tracing), RAG pipelines, Agentforce actions, inference connector, Vibes prompt engineering and governance, LLM gateway, AI testing, multi-cloud LLMs, and AI security.
CI/CD pipelines (GitHub Actions, GitLab, Jenkins), environment promotion, IaC (Terraform, Helm), secrets management, deployment strategies (blue-green, canary), MUnit testing (batch, async, error, coverage), RTF, observability, and compliance.
Java version upgrades, Mule runtime migrations (3→4, 4.9→4.10, 4.10→4.11), CloudHub 1→2, API spec conversions, connector upgrades, security migrations, monitoring migrations, build tool upgrades, and architectural modernization.
vCore right-sizing calculator, API consolidation patterns, usage-based pricing migration, dev sandbox cost reduction, CloudHub vs RTF vs on-prem TCO comparison, license audit checklist, and Anypoint MQ cost optimization.
Browse all cost optimization recipes
Bidirectional sync with conflict resolution, Bulk API 2.0 partial failure recovery, CDC vs Platform Events decision tree, governor limit-safe batch processing, Agentforce action registration, OAuth patterns, Composite API, Streaming API, and data migration strategies.
Thread dump analysis, top 30 error messages decoded, memory leak detection step-by-step, deployment failure flowchart, Anypoint Monitoring vs OpenTelemetry, connection pool exhaustion diagnosis, DataWeave OOM debugging, and batch job failure analysis.
Browse all troubleshooting recipes
API-led anti-patterns, C4E setup playbook, event-driven architecture with MuleSoft, domain-driven API design, multi-region DR strategy, application network topology, microservices vs API-led, and integration maturity model.
Browse all architecture recipes
Anypoint MQ vs Kafka honest comparison, FIFO queue patterns, DLQ reprocessing, large payload workarounds, consumer circuit breaker, VM queue vs Anypoint MQ decision tree, and message ordering guarantees.
SAP IDoc processing, Workday custom reports, ServiceNow CMDB integration, NetSuite patterns, database change data capture, SFTP guaranteed delivery, EDI X12/EDIFACT processing, and AS2 message exchange.
We welcome contributions! See CONTRIBUTING.md for guidelines.
Adding a new pattern? Place it in the appropriate section folder with a README explaining the concept.
Adding a new section? Open an issue first to discuss the scope.
MIT — Copyright (c) 2026 Shakar Bisetty
Built by WeavePilot — practical MuleSoft recipes for the community.