# Message Translator

**In short:** A Message Translator is a special filter that converts messages from one data format to another. It lets systems with different formats communicate through messaging.

## Explanation

Systems often use different data formats. When they exchange messages (see Messaging), the receiver may not understand what the sender produced. The Message Translator solves this problem.

The solution is a special filter. A filter is a processing step that takes a message in and passes a message out. You place the translator between other filters or applications. It converts one data format into another. This puts it in a pipes-and-filters arrangement (see Pipes and Filters).

**Common format.** A translator often works together with a Canonical Data Model. This is a shared message format that belongs to no single application. Every application produces and consumes messages in that format. The model minimizes dependencies between applications that use different formats.

**Related patterns.**
- Normalizer: handles messages that mean the same thing but arrive in different formats. It uses a router to send each message to the right translator.
- Content Enricher and Content Filter: listed as related patterns.
- Channel Adapter, Message Channel and Message Endpoint: also listed as related.

**In tools.** Apache Camel supports this pattern. It can use data formats that marshal and unmarshal messages in different encodings. In plain terms, it turns a message into an encoding and back again.

## Example

A web shop sends orders in one layout. The warehouse system expects a different layout. A translator sits between them. It receives each order, converts it to the warehouse layout, and passes it on. A second shop later joins with a third layout. The team adds another translator for it.

## Trade-offs

A shared canonical model pays off as the number of applications grows. With only a few applications, it is overhead.

A translator converts the sender's format into the receiver's format.

```mermaid
flowchart LR
  A[Sender: format A] --> T[Message Translator]
  T --> B[Receiver: format B]
```

## Checks

- Where applications use different data formats, the document names a translator step between them.
- If a common message format is used, it is independent of any specific application.
- The choice of a canonical model considers how many applications exchange messages.

## Related

- [Canonical Data Model](https://arc.fuet.ch/concepts/integration/canonical-data-model.md)
- [Normalizer](https://arc.fuet.ch/concepts/integration/normalizer.md)
- [Content Enricher and Content Filter](https://arc.fuet.ch/concepts/integration/content-enricher.md)
- [Content Filter](https://arc.fuet.ch/concepts/integration/content-filter.md)
- [Pipes and Filters](https://arc.fuet.ch/concepts/styles-patterns/pipes-and-filters.md)
- [Messaging](https://arc.fuet.ch/concepts/integration/messaging.md)
- [Message Channel](https://arc.fuet.ch/concepts/integration/message-channel.md)
- [Envelope Wrapper](https://arc.fuet.ch/concepts/integration/envelope-wrapper.md)

## Sources

- [Message Translator - Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageTranslator.html) — enterpriseintegrationpatterns.com, accessed 2026-11-09
- [Canonical Data Model - Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/CanonicalDataModel.html) — enterpriseintegrationpatterns.com, accessed 2026-11-09
- [Normalizer - Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/Normalizer.html) — enterpriseintegrationpatterns.com, accessed 2026-11-09
- [Message Translator :: Apache Camel](https://camel.apache.org/components/4.22.x/eips/message-translator.html) — camel.apache.org, accessed 2026-11-09
