Portal Community

Incoming Pipeline Flow

All hooks added to server.incomingPipeline are "incoming hooks." They handle the full lifecycle of a received message:

5

HookActivityLogger (priority 5)

Captures hook timings — must run first to observe all others.

90

DecryptHook (priority 90)

Decrypts encrypted body. Runs before any body inspection.

95

VerifySignatureHook (priority 95)

Verifies message authenticity on original format.

100

ValidationHook (priority 100)

Schema validation before normalization.

110

NormalizationHook (priority 110)

Converts to CloudEvents format.

120+

Custom hooks (priority 120+)

Enrichment, filtering, processing, audit. Register any hook at any priority in this range.

Registering Incoming Hooks

const server = edgeStream.server('bas')!;

// All these are "incoming hooks" — they process inbound messages
server.incomingPipeline.addHook(new HookActivityLogger());
server.incomingPipeline.addHook(new NormalizationHook());
server.incomingPipeline.addHook(new TenantFilterHook(tenantId));
server.incomingPipeline.addHook(new WorkflowEventMapperHook());
server.incomingPipeline.addHook(new AuditLogHook(auditService));

Incoming vs. Outgoing

AspectIncoming PipelineOutgoing Pipeline
Triggered byMessage arrives from transportserver.send(topic, body)
DirectionTransport → Subscriber callbacksApplication → Transport
Common hooksDecrypt, Verify, Normalize, Enrich, AuditSign, Encrypt, Rate-limit, Log
Terminal actionPublish to subscribersTransport.send()