# Publish the event from a service

Copy as Markdown[View as Markdown](/docs/tutorial/publish-event.md)

***

In this step, you will connect `OrderService` to the `OrderPlaced` event.

In EventCatalog, a service publishes an event by listing it under `sends`.

## In this chapter...

Here are the topics we'll cover

* Open the OrderService page.
* Add OrderPlaced to the sends list.
* Refresh EventCatalog and inspect the relationship.

### Update the service[​](#update-the-service "Direct link to Update the service")

Open `services/OrderService/index.mdx` and add `sends` to the frontmatter:

services/OrderService/index.mdx

```
---
id: OrderService
name: Order Service
version: 0.0.1
summary: |
  Handles customer orders from checkout through to fulfilment.
sends:
  - id: OrderPlaced
    version: 0.0.1
---
```

Keep the markdown content below the frontmatter as it is.

The `version` field inside `sends` is optional. If you leave it out, EventCatalog will use the latest version of the event.

### Check the relationship[​](#check-the-relationship "Direct link to Check the relationship")

Refresh EventCatalog in your browser and open the [Order Service page](http://localhost:3000/visualiser/services/OrderService/0.0.1).

You should now be able to see that `OrderService` publishes `OrderPlaced`. Open the event page as well. EventCatalog can now show the event and its producer as connected resources.

You can also open the `Map` view from the Order Service page to see the relationship visually.

![The Order Service map showing that it publishes the Order Placed event](/img/tutorial/order-service-publishes-order-placed-map.png)

The Order Service map showing the OrderPlaced publish relationship.

We are only setting up the producer in this step. Next, you will add another service and connect it as a consumer with `receives`.

### What you have now[​](#what-you-have-now "Direct link to What you have now")

Your catalog now knows:

* `OrderPlaced` is an event.
* `OrderPlaced` has a schema.
* `OrderService` publishes `OrderPlaced`.

### Next[​](#next "Direct link to Next")

Continue to [Consume the event from a service](/docs/tutorial/consume-event.md).
