Files
medusa-store/packages/modules/event-bus-local
Adrien de Peretti ecc8efcb04 fix(event): Subscriber ID miss usage (#11047)
PARTIALLY RESOLVES FRMW-2876

**What**
Fix wrong usage of the `subscriberId` in the event bus. It happens that the subscriber id coming from the context was not used at all. This issue lead to duplicated event subscriber with the same subscriber id, it also prevent unsubscribing from event since rand id will be assigned.

**NOTE**
This PR does not handle overide strategy for subscribers with the same id. this still needs to be discussed
2025-01-22 07:40:31 +00:00
..
2025-01-20 07:41:15 -05:00
2025-01-20 07:41:15 -05:00

Medusa

@medusajs/event-bus-local

Documentation | Website

An open source composable commerce engine built for developers.

Medusa is released under the MIT license. Current CircleCI build status. PRs welcome! Product Hunt Discord Chat Follow @medusajs

Overview

Local Event Bus module for Medusa. When installed, the events system of Medusa is powered by the Node EventEmitter. This module installed by default in new (> v1.8.0) Medusa projects.

The Node EventEmitter is limited to a single process environment. We generally recommend using the @medusajs/event-bus-redis module in a production environment.

Getting started

Install the module:

yarn add @medusajs/event-bus-local

You don't need to add the module to your project configuration as it is the default one. Medusa will try to use it, if no other event buses are installed.

module.exports = {
  // ...
  modules: [ ... ],
  // ...
}

Configuration

The module comes with no configuration options.