Quiz Entry - updated: 2026.07.30
A protocol's lifecycle produces two categories of events. What are they, and how is each delivered?
Protocol state changes are pushed out as Server-Sent Events (SSE); user-defined notifications are published through an AMQP message broker.
* Two lanes out (SSE for state changes, AMQP for notifications after commit); one lane back in (REST + short-lived JWT). *
NPL splits everything a running protocol emits into two streams:
- Protocol state changes → Server-Sent Events (SSE) — a lightweight one-way HTTP push from server to client. When a protocol's state changes, an SSE is emitted; consumers subscribe to update a user interface or notify external systems in real time.
- User-defined notifications → AMQP message broker — custom, typed messages the developer explicitly declares and fires from within the NPL logic, delivered through a message broker (AMQP = Advanced Message Queuing Protocol).
The split matters: state changes are automatic and structural, while notifications are hand-authored integration points the developer designs for specific consumers.
Go deeper:
Server-sent events (Wikipedia) — the one-way HTTP push (
text/event-stream) used for the automatic state-change lane.Advanced Message Queuing Protocol (Wikipedia) — the open broker protocol carrying the user-defined notification lane.