#i am using redis-bus-event how can i emit my custom event ?

1 messages · Page 1 of 1 (latest)

spring pagoda
#

this.eventBusService.emit("custom-event", {
// attach any data to the event
})
this was in medusajs documentation but how to import it or use it when i simply import it from "@medusajs/medusa" it gives error emit() does not exists on type EventBusService

quartz spruce
#

are you using it inside a custom service? make sure to register it first on the constructor! I attach an example from my code.