# What are messages?

Copy as Markdown[View as Markdown](/docs/development/guides/resources/messages/what-are-messages.md)

***

EventCatalog supports different types of messages ([commands](/docs/development/guides/resources/messages/message-types/commands.md), [events](/docs/development/guides/resources/messages/message-types/events.md) and [queries](/docs/development/guides/resources/messages/message-types/queries.md)).

* **Commands** - represent intent, commands can be rejected in distributed systems.
* **Events** - represents an immutable fact.
* **Queries** - represent requests for information.

### Linking messages to services, domains and channels[​](#linking-messages-to-services-domains-and-channels "Direct link to Linking messages to services, domains and channels")

* Messages can be sent (producer) or received (consumer) by [services](/docs/development/guides/resources/services/introduction.md), [domains](/docs/development/guides/domains/add-resources-to-domains/add-messages-to-domains.md) or be totally independent.
* You can also route messages through one or more [channels](/docs/development/guides/resources/messages/message-channels/adding-messages-to-services.md) (e.g queue, broker, bus).

### Where do messages live?[​](#where-do-messages-live "Direct link to Where do messages live?")

Messages can live anywhere in your catalog, at the service level or domain level.

**Example of a message living at the service level**

Here we have the `OrderPlaced` message living at the service level.

* services
  <!-- -->
  /
  * Orders
    <!-- -->
    /
    * events
      <!-- -->
      /
      * OrderPlaced
        <!-- -->
        /
        * index.mdx

**Example of a message living at the domain level**

Here we have the `OrderPlaced` message living at the domain level.

* domains
  <!-- -->
  /
  * Orders
    <!-- -->
    /
    * events
      <!-- -->
      /
      * OrderPlaced
        <!-- -->
        /
        * index.mdx

You can reference messages from anywhere in your catalog

It does not matter where you store your messages, you can reference them from anywhere in your catalog. Your domains and services will reference them by their `id` and optionally the `version`. EventCatalog will resolve the message.
