Skip to main content

Channel frontmatter API

Overview​

Channels are just markdown files, with this comes the use of Content, MDX components and also front-matter.

Here is an example of the channel frontmatter you will find in your /channels folder.

/channels/inventory.{env}.events/index.md (example)
---
# id of your channel, used for slugs and references in EventCatalog.
id: inventory.{env}.events

# Display name of the channel, rendered in EventCatalog
name: Inventory Events Channel

# Version of the channel
version: 1.0.0

# Short summary of your channel
summary: |
Central event stream for all inventory-related events including stock updates, allocations, and adjustments

# Optional owners, references teams or users
owners:
- dboyne

# address of the channel
# supports parameters in the address
address: inventory.{env}.events

# list of protocols for the channel
# see https://eventcatalog.dev/docs/development/guides/channels/introduction#protocols
protocols:
- kafka

# Optional list of parameters for the channel
# This example shows the `env` value in the channel name can be `dev, stg, prod`.
parameters:
env:
enum:
- dev
- stg
- prod
description: 'Environment to use'
---

### Overview
The Inventory Events channel is the central stream for all inventory-related events across the system. This includes stock level changes, inventory allocations, adjustments, and stocktake events. Events for a specific SKU are guaranteed to be processed in sequence when using productId as the partition key.

<ChannelInformation />

Required fields​

id​

  • Type: string

Unqiue id of the channel. EventCatalog uses this for references and slugs.

Example
---
id: inventory.{env}.events
---

name​

  • Type: string

Name of the channel this is used to display the name on the UI.

Example
---
name: Inventory events
---

version​

  • Type: string

Version of the channel.

Example
---
version: 0.0.1
---

Optional fields​

summary​

Short summary of your channel.

Example
---
summary: |
Central event stream for all inventory-related events including stock updates, allocations, and adjustments
---

address​

Address of the channel.

Example
---
# example of dynamic address
address: inventory.{env}.events

# static address
address: MyEventBus

---

protocols​

Protocol/s of the channel.

Example
---
# example of a kafka channel
protocol:
- kafka

# example of a channel that is http, mqtt or kafka (if you ever wanted too...)
protocol:
- http
- mqtt
- kafka

---

parameters​

Parameters for your channel.

Example
---
parameters:
# any string value
env:
# list of possible values for the parameter
enum:
- dev
- stg
- prod
# description for the parameter (optional)
description: 'Environment to use'
# list of examples (optional)
examples
- dev
- stg
# default value for channel
default
- dev
---

owners​

An array of user ids that own the channel.

Example
---
owners:
- dboyne
- mSmith
---

badges​

An array of badges that get rendered on the page.

Example
---
badges:
- content: My badge
backgroundColor: blue
textColor: blue
---

repository​

Repository language and code url for the channel.

Example
---
repository:
language: JavaScript
url: https://github.com/event-catalog/pretend-shipping-service
---