# Message Dispatcher

A **Message Dispatcher** is a pattern that represents a single channel that consumes external messages and distributes them to pipelines or other performers.

The benefit of using this pattern is that you don't need to duplicate logic and all messages of a certain type will always go through the same channel before reaching the performers.

In the example below, an external message coming to this pipeline from outside of Ylem is being used for [calling an API](/pipelines/tasks-ip/api-call.md), performing a [database query](/pipelines/tasks-ip/query.md), and [sending a notification](/pipelines/tasks-ip/notification.md) message. One pipeline, one message, three tasks.

<figure><img src="/files/b5B6hdEaEg9TAWFueSZW" alt=""><figcaption></figcaption></figure>


---

# 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-dispatcher.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.
