> For the complete documentation index, see [llms.txt](https://docs.ecotone.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecotone.tech/messaging/contributing-to-ecotone/ecotone-phases.md).

# Ecotone Phases

Ecotone bootstrap phases and lifecycle

## Phases

To increase application speed **Ecotone works in three phases**.

## **Compile Phase:**

In this Phase, Ecotone is looking for all the configuration. This is optimized to look only for concrete Ecotone classes and scan our application level catalog (Depending on the configuration).

After all configuration is collected, Ecotone executes Modules in order to prepare them.\
Each Module produces it's own set of configuration, like Command Handlers, Event Handlers, Interceptors etc. After this all the configuration is registered in Messaging system and we are ready to move to the next phase.

## **Dumping Phase:**

After all configuration is collected, Ecotone will dump the configuration, so it can be reused between requests. This depending on the integration, may be dumped directly to our Depedency Container or as a separate configuration file.

The configuration now is ready to be re-used.

## Execution Phase:

Execution Phase is executing Messaging Flow. This happen when we actually trigger Command or Query Bus on Run Time for example.\
In this phase there is no need for collecting or dumping the configuration anymore, as that was already done. Therefore Ecotone load already prepared configuration and executes.

The big advantage of Ecotone is that during Execution Phase, it only executes and load the configuration for the flow that is being executed. This way the speed of execution can be preserved even for big projects.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecotone.tech/messaging/contributing-to-ecotone/ecotone-phases.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
