How it Works
The NRF Support for 5G-SMF Subscription and Notification feature uses the NF Subscribe service to subscribe to changes on the status of NF instances that the NF receives as discovery responses. The SMF sends a subscription for the response validity period for each of the NF profiles that it receives in the discovery response. The SMF checks if an existing NF instance subscription time needs an extension or not depending on the current response time validity. If a subscription needs an extension, a subscription PATCH is sent with the extended validity time.
During subscription, the NRF may respond with a modified validity time. This validity time might differ from the SMF validity time request. In such a scenario, the SMF tracks the required subscription time and the actual subscription time returned by the NRF.
The SMF periodically (every two minutes) checks in database if there is any subscription with the actual subscription time ending soon (as in next five minutes) but has required validity time more than the actual validity time. In this scenario, the SMF sends a PATCH subscription to extend the subscription validity time.
The SMF fills the Status Notification URI based on the interface NRF configuration that is specified in the configuration. The notification vip ip and vip port are used to frame the status notification URI.
http://{nrfinterface.vip-ip}:{ nrfinterface.vip-port}/{notifResourceURI}
On status notification, the SMF updates the local cache and the external cache (cache pod) with the changed attributes.