## Available Hooks

The Cosmo Streams system provides three main hook interfaces that you can implement with [Custom Modules](https://cosmo-docs.wundergraph.com/router/custom-modules):

- [`SubscriptionOnCreateHandler`](https://cosmo-docs.wundergraph.com/router/cosmo-streams/custom-modules/subscription-on-create): Called before a subscription is registered, allows modifying the event configuration (experimental)
- [`SubscriptionOnStartHandler`](https://cosmo-docs.wundergraph.com/router/cosmo-streams/custom-modules/subscription-on-start): Called when a client subscribes
- [`OnReceiveEventHandler`](https://cosmo-docs.wundergraph.com/router/cosmo-streams/custom-modules/on-receive-event): Called when events are received from a message broker
- [`OnPublishEventHandler`](https://cosmo-docs.wundergraph.com/router/cosmo-streams/custom-modules/on-publish-event): Called when events are going to be sent to a message broker
