# Message Router

A **Message Router** is software, which consumes a Message from one Message Channel and republishes it to a different Message Channel channel depending on a set of conditions.

With Ylem this pattern can be implemented by using "**Condition**" and "**Run pipeline**" tasks in the pipeline that acts as a receiver of external messages.

<figure><img src="https://3180830455-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FD0FT8l3QzMrw546vOdHU%2Fuploads%2FKdCCwpOdySyPlWYupVpR%2FScreenshot%202024-05-03%20at%2021.36.24.png?alt=media&#x26;token=0be3642e-8c97-4f86-abd1-7e50fe394044" alt=""><figcaption></figcaption></figure>

This pattern implementation can in some scenarios look similar to the [Publish-Subscribe Channel](https://docs.ylem.co/use-cases/messaging-patterns/publish-subscribe-channel) implementation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ylem.co/use-cases/messaging-patterns/message-router.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
