Notification Stream is a mechanism of NFD Management protocol.
It is a way to get updates about events happening in the forwarder. This mechanism is useful for monitoring the forwarder's state.
- A stream of notifications is published under a certain Name prefix.
- A notification is a Data packet under this Name prefix with a sequence number.
- The sequence number component is a NameComponentWithMarkerAndNumber, as in NDN Naming Conventions. This component starts with a 0xFE marker, followed by a nonNegativeInteger.
- The sequence numbers of notifications in the same stream should be consecutive and increasing.
- Each notification is limited to one Data packet.
ndn:/localhost/nfd/faces/events/%FE%00 // first notification ndn:/localhost/nfd/faces/events/%FE%01 // second notification
Notifications from NFD are Data packets generated and signed by NFD.
FreshnessPeriod should be set to a minimum value (typically 1ms) to facilitate subscriber operations.
The management dispatcher keeps them in an in-memory cache, ready for retrieval by subscribers.
The subscriber should initially request the Name of the notification stream with CanBePrefix and MustBeFresh elements.
After a notification is received, the subscriber can send an Interest for the next anticipated sequence number, without CanBePrefix and MustBeFresh elements.
In both cases, InterestLifetime should be set to a long duration, e.g., 1 minute.
If any Interest times out (because no notification is delivered within InterestLifetime), the subscriber should restart with the initial request.