events-default
bsb/events-defaultDefault in-process events plugin for BSB event routing
events-default
events-default is the built-in in-process events plugin for BSB.
It handles plugin-to-plugin communication inside a single runtime.
What It Supports
- Fire-and-forget events
- Returnable events (request/response)
- Broadcast events
- Stream relay support
Minimal Example
default:
events:
events-default:
plugin: events-default
enabled: true
Operational Characteristics
- In-memory only
- No cross-container message routing
- No broker-backed durability/replay
When To Replace
Replace with a distributed events backend when you run multiple BSB instances or need durable messaging.
Events-Default Patterns
events-default supports all core BSB event patterns in-process.
Fire-And-Forget
Use for async notifications where no response is needed.
await this.events.emitEvent(obs, "service-orders", "order.created", [{ id: "o1" }]);
Returnable Events
Use for request/response between plugins.
const user = await this.events.emitEventAndReturn(
obs,
"service-users",
"user.get",
10,
[{ id: "u1" }]
);
Broadcast
Use for fan-out events to all listeners.
await this.events.emitBroadcast(obs, "service-cache", "cache.flush", []);
Streams
Use for large payloads / continuous transfer.
const streamId = await this.events.receiveStream(obs, "service-files", "file.stream", async () => {});
Operational Notes
- In-memory only (single process/container boundary).
- No broker durability.
- Replace with distributed event plugins for multi-instance deployments.
Installation
Install plugin (Node.js)
npm i @bsb/base
Configuration
Configuration options for this plugin:
No configuration required
Available Versions
v9.6.69
v9.6.68
v9.6.67
v9.6.66
v9.6.65
v9.6.64
v9.6.63
v9.6.62
v9.6.61
v9.6.60
v9.6.59
v9.6.58
v9.6.57
v9.6.56
v9.6.55
v9.6.54
v9.6.53
v9.6.52
v9.6.51
v9.6.50
v9.6.49
v9.6.48
v9.6.47
v9.6.46
v9.6.45
v9.6.44
v9.6.43
v9.6.42
v9.6.41
v9.6.40
v9.6.39
v9.6.38
v9.6.37
v9.6.36
v9.6.35
v9.6.34
v9.6.33