# Message Translator

> Convert a message from one format to another — the messaging equivalent of the Adapter pattern.

- **Category**: Integration
- **Subcategory**: Message Transformation
- **Canonical URL**: https://designpattern.fyi/patterns/message_translator/

---

## Description
Clean, reusable architecture pattern.


## Use Cases
Legacy ERP sends SOAP/XML inventory updates. Modern microservices consume JSON events. Message Translator sits between them — converts XML InventoryUpdate to JSON InventoryChanged events. Neither system knows the other exists.





## Trade-offs


### Advantages

- Neither system needs to change their native format

- Centralized translation logic — one place to update when schemas evolve

- Enables integration of legacy and modern systems

- Reusable translation components across integration flows




### Considerations & Drawbacks

- Translation logic must be maintained as source/target schemas evolve

- Semantic loss possible if source/target models do not map cleanly

- Translation adds processing overhead and latency

- Complex translations can become brittle maintenance liabilities







---
**Reference**: [Original Source](https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageTranslator.html)

