Maps external signals to service methods.
Parameters:
signalName(string): External signal identifiermethodName(string, optional): Service method name (defaults to signalName)paramTransformer(function, optional): Transform incoming parametersresultTransformer(function, optional): Transform outgoing results
Common options for all signal routers.
Fields:
before/afterhooksdebug(boolean)eventPattern(string)accessControl(ACL rules)
Options: SignalRouterOptions + servers?: string[] + reconnect?: { enabled?, maxAttempts?, timeWaitMs?, jitterMs?, jitterTlsMs?, waitOnFirstConnect?, lazyConnect? }
Options: SignalRouterOptions
Options: SignalRouterOptions + port?, path?, cors?, serviceName?, discovery?
Options: SignalRouterOptions
NevoNatsClient(methods:query,emit,publish,subscribe,broadcast,getAvailableServices,getDiscoveredServices,isServiceAvailable)NatsClientBase- base class with the same protected methodscreateNevoNatsClient(serviceNames, options)- Nest provider (NEVO_NATS_CLIENT)createNatsMicroservice(options)- Nest bootstrap for NATS transport
NevoNatsClientOptions.reconnect:
enabled?: boolean(defaulttrue)maxAttempts?: number(default-1)timeWaitMs?: number(default5000)jitterMs?: numberjitterTlsMs?: numberwaitOnFirstConnect?: booleanlazyConnect?: boolean(iftrue, setswaitOnFirstConnecttofalseby default)
NevoKafkaClient(methods:query,emit,publish,subscribe,broadcast,getAvailableServices,getDiscoveredServices,isServiceAvailable)KafkaClientBase- base class with the same protected methodscreateNevoKafkaClient(serviceNames, options)- Nest provider (NEVO_KAFKA_CLIENT)createKafkaMicroservice(options)- Nest bootstrap for Kafka transport
NevoSocketClient(methods:query,emit,publish,subscribe,broadcast,getAvailableServices,getDiscoveredServices,isServiceAvailable)SocketClientBase- base class with the same protected methodscreateNevoSocketClient(serviceUrls, options)- Nest provider (NEVO_SOCKET_CLIENT)createSocketMicroservice(options)- Nest bootstrap for Socket.IO transport
NevoHttpClient(methods:query,emit,publish,subscribe,broadcast,getAvailableServices,getDiscoveredServices,isServiceAvailable)HttpClientBase- base class with the same protected methodscreateNevoHttpClient(serviceUrls, options)- Nest provider (NEVO_HTTP_CLIENT)createHttpMicroservice(options)- Nest bootstrap for HTTP transportHttpTransportController- adds HTTP/SSE endpoints:POST /:service-eventsfor query/emitPOST /__nevo/publishandGET /__nevo/subscribefor subscriptionsPOST /__broadcastandGET /__broadcastPOST /__nevo.discoveryandGET /__nevo.discovery
NevoHttp2Client(method:queryonly — HTTP/2 is request/reply, no pub/sub)
NevoWsClient/NevoSocketClient(methods:query,emit,publish,subscribe,broadcast)createNevoWsClient(serviceUrls, options)(tokenNEVO_WS_CLIENT) /createNevoSocketClient(serviceUrls, options)(tokenNEVO_SOCKET_CLIENT)
For the full per-transport support grid (which transports offer
requestMany,subscribeWildcard, JetStream, realack), see docs/capability-matrix.md.
For unit/integration tests with zero IO — no brokers, no Docker.
createMemoryTransport(opts?)→MemoryTransport(eagerly registersopts.handlers)MemoryTransport—query/emit/publish/subscribe/broadcast/subscribeBroadcast,registerHandler,unregisterHandler,resetMemoryClientBase— drop-in base class replacingNatsClientBase/KafkaClientBase/etc.MemoryHarness— fault injection:failNext(service, method, err),delayBy(service, method, ms),advanceTime(ms),now(),reset(), and the recordedcalls[]
See docs/testing.md.
Declarative method decorators read by the runtime (resilience-runtime.ts). See docs/resilience-decorators.md.
@Hedge(options?)— parallel attempts for long-tail reads. Wrapshedge().@CircuitBreaker(options?)—{ mode: "sliding" | "count", windowMs?, errorRateThreshold?, minSampleSize?, keyBy? }. Defaults to the sliding-window breaker.@Adaptive(options?)—{ targetP99Ms?, keyBy? }. Auto-tunes timeout/retries from observed latency.@Backpressure(options?)—{ maxInflight, highWatermark?, lowWatermark?, onOverflow?, keyBy? }. Pauses/resumes the subscription.
Lower-level helpers:
readMethodResilience(target, propertyKey)→ compiled config (orundefined)wrapMethodWithResilience(target, propertyKey, fn, keyFn)→ wrapped callablemakeResilienceRunner(target, propertyKey)→ reusable runnerapplyResilience(...),snapshotResilience()→{ adaptive, sliding, backpressure }keyed byservice:method
The functional API is also exported directly: hedge, CircuitBreakerRegistry, SlidingCircuitBreakerRegistry, AdaptiveTuner, BackpressureLimiter.
All Postgres stores take { client: PgClient, schema?, table?, logger? } and expose migrate(). See docs/storage-matrix.md.
| Export | Interface | Backend |
|---|---|---|
PgOutboxStore |
OutboxStore |
Postgres |
PgInboxStore |
InboxStore |
Postgres |
PgSagaStore |
SagaStore |
Postgres |
PgEventStore |
EventStore |
Postgres |
PgDlqStore |
DlqStore |
Postgres |
PgScheduledTaskStore |
ScheduledTaskStore |
Postgres |
SqliteOutboxStore |
OutboxStore |
node:sqlite (single pod) |
RedisIdempotencyStore |
IdempotencyStore |
Redis (+ L1 LRU) |
RedisInboxStore |
InboxStore |
Redis |
RedisRateLimiter |
rate limiter | Redis (Lua token bucket) |
LruIdempotencyCache |
IdempotencyStore |
in-memory |
InMemoryEventStore / InMemoryScheduledTaskStore |
EventStore / ScheduledTaskStore |
in-memory |
migrateAllPgStores(client, schema?)— run every Pg store'smigrate()(does not create the audit table).- Client shapes:
PgClient,IdempotencyRedisLike,InboxRedisClient,RateLimitRedisClient(4-line wrappers overpg/postgres/pg-promiseandioredis/node-redis).
See docs/workflow.md.
WorkflowEngine—{ store?, scheduler?, logger? }. Methods:register,start,resume,signal,cancel,getState.@Workflow(options?)—{ name? }.discoverAndRegisterWorkflows(engine, instances),getWorkflowMethods(target).WorkflowContext<C>—workflowId,input,step(name, fn),sleep(ms),waitForSignal(name, { timeoutMs? }),now().isWorkflowSuspended(err),WORKFLOW_SUSPEND,WorkflowSignalTimeout(thrown bywaitForSignalontimeoutMs),WorkflowState,WorkflowStatus.
See docs/scheduler.md.
Scheduler—{ store?, pollIntervalMs?, batchSize?, claimTtlMs?, maxAttempts?, workerId?, logger? }. Methods:registerHandler,enqueueAt,enqueueIn,enqueueCron,cancel,list,start,stop,flushOnce.@Scheduled(options?)—{ name?, cron?, at?, in?, maxAttempts?, timezone?, utc? }.discoverAndRegisterScheduled(scheduler, instances).- Cron helpers:
nextCronTick(expr, from, opts?),isValidCron(expr),parseCron(expr),CronOptions.
See docs/audit-log.md.
AuditLog—{ enabled?, redactPaths?, maxEntryBytes?, sink?, logger? }. Methods:record,recordFromResponse,flush,close,isEnabled.- Sinks:
InMemoryAuditSink,FileAuditSink,PgAuditSink,TeeAuditSink(all implementAuditSink). AuditEntry,AuditOutcome.
TenantPolicyRegistry—set,get,setEnabled,isAllowed,list,remove,clear.getTenantPolicyRegistry(),setTenantPolicyRegistry(r).assertTenantAllowed(serviceName, tenantId)— throwsUNAUTHORIZEDfor a disabled tenant.buildResilienceKey(ctx, keyBy?),TenantKeyDimension,ResilienceKeyContext.
runInChain(ctx, fn),getCurrentChainContext(),getCurrentChainId(),newChainId().resolveInboundChainId(metaChainId),resolveOutboundChainId(explicit?),getChainStorage().
HealthRegistry—{ serviceName, instanceId?, version?, timeoutMs?, cacheMs? }.register(name, fn, opts?),liveness(),readiness(),report(kind).- Built-in checks:
pgPing,redisPing,kafkaAdminPing,natsPing,httpPing,memoryUsagePing(thresholdMb),eventLoopLagPing(thresholdMs).
See docs/metrics.md.
InMemoryMetricsimplementsMetricsRegistry;getDefaultMetrics(),setDefaultMetrics(m).NEVO_METRIC_NAMES(includesstoreErrors),methodLabel(method, isKnown?),UNKNOWN_METHOD_LABEL.
See docs/codecs.md.
- Codecs:
JsonCodec,JsonCodecFast,MessagePackCodec(all implementCodec). getDefaultCodec()(MessagePack if available, else JSON),setDefaultCodec(codec),getCodec(name),registerCodec(codec).CodecName="msgpack" | "json" | "json-fast" | string.
See docs/error-codes.md.
ErrorCodeenum (0–19),isRetryable(code),MessagingError.