Skip to content

EventsModule

Module in @evolve-framework/medusa

The route @evolve-framework/medusa-plugin-events posts to, publishing the shared product and category events for what it forwards, so a CMS and a search index follow a Medusa catalog as they follow commercetools.

import { EventsModule } from "@evolve-framework/medusa/modules";
new EventsModule(options: EventsModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The client a forwarded product or category is read back through. Its store keys are the store_keys every product event carries.

messagePublisherMessagePublisher

Where the internal events go.

originstring

Stamped on every event as its origin.

secret?string

The secret the plugin sends as x-events-secret. Without one any caller is accepted, which only suits a route nothing outside the cluster reaches.

path?string

Where the plugin posts. Defaults to "/events/medusa".

Extends AbstractModule<unknown>.