Skip to content
全部能力
集成packages/integrations/event-bus

event-bus 能力包

进程内 pub/sub + 跨应用 fanout;audit / billing / notifications 借此响应 commerce 事件,避免循环依赖。

打开文档
稳定性
稳定
作用域
全局
边界
packages/integrations/event-bus
event-buspackages/integrations/event-bus
Provider-agnostic
可用提供方
NATSstandby
Kafka在用
Inngeststandby
传入请求event-bus
{ topic: "orders.created", v: 1 }
Adapter 解析3毫秒
event-bus 分发100毫秒
已确认2毫秒
x

提供方

Kafka

P50 延迟

110 毫秒

成功率

98%

+0.7%

今日总量

6,028

packages/integrations/event-busprovider-agnostic
使用方式event-bus.ts
typescript
event-bus.ts
1import { getEventBusProvider } from "@nebutra/event-bus";
2
3// Provider-agnostic — backend chosen from env at runtime.
4const eventBus = await getEventBusProvider();
5
6await eventBus.connect({ tenantId: org.id });