# @backstage/plugin-events-node

> The plugin-events-node module for @backstage/plugin-events-backend

Latest version **0.4.25** (published 2026-08-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @backstage/plugin-events-node
pnpm add @backstage/plugin-events-node
yarn add @backstage/plugin-events-node
bun add @backstage/plugin-events-node
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.25 |
| Published | 2026-08-18 |
| First published | 2022-11-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 108 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34289 |
| Maintainers | patriko, freben, marcuseide |

## Links

- npm: https://www.npmjs.com/package/@backstage/plugin-events-node
- Repository: https://github.com/backstage/backstage
- Homepage: https://backstage.io
- npm.io page: https://npm.io/package/@backstage/plugin-events-node

## Dependencies (9)

- [express](https://npm.io/package/express.md) ^4.22.0
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^4.0.0
- [content-type](https://npm.io/package/content-type.md) ^1.0.5
- [uri-template](https://npm.io/package/uri-template.md) ^2.0.0
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.6
- [@backstage/types](https://npm.io/package/@backstage/types.md) ^1.2.2
- [@backstage/errors](https://npm.io/package/@backstage/errors.md) ^1.3.1
- [@types/content-type](https://npm.io/package/@types/content-type.md) ^1.1.8
- [@backstage/backend-plugin-api](https://npm.io/package/@backstage/backend-plugin-api.md) ^1.10.0

## Recent versions

- 0.4.25 (latest) — 2026-08-18
- 0.0.0-nightly-20260909022715 (nightly) — 2026-09-09
- 0.4.26-next.0 (next) — 2026-09-01
- 0.0.0-nightly-20260904022803 — 2026-09-04
- 0.0.0-nightly-20260902024315 — 2026-09-02
- 0.0.0-nightly-20260818023149 — 2026-08-18
- 0.0.0-nightly-20260817023522 — 2026-08-17
- 0.0.0-nightly-20260816023538 — 2026-08-16
- 0.0.0-nightly-20260815023121 — 2026-08-15
- 0.0.0-nightly-20260814030239 — 2026-08-14
- 0.0.0-nightly-20260813030414 — 2026-08-13
- 0.0.0-nightly-20260812030228 — 2026-08-12
- 0.0.0-nightly-20260811025108 — 2026-08-11
- 0.0.0-nightly-20260810025551 — 2026-08-10
- 0.0.0-nightly-20260809025047 — 2026-08-09
- … 1258 more at https://npm.io/package/@backstage/plugin-events-node/versions

## README

# `@backstage/plugin-events-node`

This package defined basic types for event-based interactions inside of Backstage.

Additionally, it provides the core event service `eventsServiceRef` of type `EventsService`
with its default implementation that uses the `DefaultEventsService` implementation.

`DefaultEventsService` is a simple in-memory implementation
that requires the co-deployment of producers and consumers of events.

## Installation

Add `@backstage/plugin-events-node` as dependency to your plugin or plugin module package
to which you want to add event support.

Use `eventsServiceRef` as a dependency at your plugin or plugin module.

### Legacy Backend System

Create an `EventsService` instance and add it to the environment.

```ts
// packages/backend/src/plugins/events.ts
import { DefaultEventsService } from '@backstage/plugin-events-node';

// ...

function makeCreateEnv(config: Config) {
  // ...
  const eventsService = DefaultEventsService.create({ logger: root, config });
  // ...
  return (plugin: string): PluginEnvironment => {
    // ...
    return {
      // ...
      events: eventsService,
      // ...
    };
  };
}
```

Use the `events` from the `PluginEnvironment` as desired:

```ts
// packages/backend/src/plugins/events.ts
export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  // ...
  env.events; // ...
  // ...
}
```

## Use Case

### Exchange service implementation

Create your custom service factory implementation:

```ts
import { eventsServiceRef } from '@backstage/plugin-events-node';
// ...
export const customEventsServiceFactory = createServiceFactory({
  service: eventsServiceRef,
  deps: {
    // add needed dependencies here
  },
  async factory({ logger }) {
    // add your custom logic here
    return customEventsService;
  },
});
```

and your custom implementation:

```diff
// packages/backend/src/index.ts
+  backend.add(customEventsServiceFactory);
```

---
_Source: https://npm.io/package/@backstage/plugin-events-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
