A Use Cases for Allow Duplicate Subscriptions
This section describes the behavior of allowDuplicateSubscriptions
            parameter for different use cases. For more information, about configuring
                allowDuplicateSubscriptions parameter, see "NF Management Options"
            section in Oracle Communications Cloud Native Core, Network Repository Function
                REST API Guide.
               
Use Case 1: If the value of allowDuplicateSubscriptions is set as
                false and same subscription request than existing ones 
                  
NRF checks for duplicate subscription by matching the current subscription request
                with every subscription present in NRF except the validityTime
                attribute. 
                  
Existing subscription with NRF:
Subscription-1
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"subscriptionId":"54d05ee9d3c042b0bf1499463cf53fe0",
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-01-18T08:56:23.382Z"
}
                  New NFStatusSubscribe Request:
Subscription-2
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType":"UDM"},
"validityTime":"2025-06-12T08:56:23.382Z"
}
                  As per the above example, Subscription-2 matches exactly with Subscription-1 except
                with the validityTime, the subscription response contains the same
                    subscriptionId and validityTime of
                Subscription-1.
                  
Use Case 2: If the value of allowDuplicateSubscriptions value is set
                to false and different subscription request than existing ones.
                  
NRF checks for duplicate subscription by matching the current subscription request
                with every subscription present in NRF except the validityTime
                attribute. 
                  
Existing Subscription with NRF:
Subscription-1
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"subscriptionId":"54d05ee9d3c042b0bf1499463cf53fe0",
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-01-18T08:56:23.382Z"
}
                  New NFStatusSubscribe Request:
Subscription-3
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification-new,
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-06-12T08:56:23.382Z"
}
                  As per the above example, Subscription-3 does not match with Subscription-1 as
                nfStatusNotificationUri is different. In this case, NRF creates a new subscription.
                Hence, subscription response returns the new subscriptionId.
                  
Use Case 3:- If the value of allowDuplicateSubscriptions is set to
                false and different subscription request than existing ones
                  
NRF checks for duplicate subscription by matching the current subscription request
                with every subscription present in NRF except the validityTime
                attribute. 
                  
Existing Subscription with NRF:
Subscription-1
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"subscriptionId":"54d05ee9d3c042b0bf1499463cf53fe0",
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-01-18T08:56:23.382Z"
}
                  New NFStatusSubscribe Request:
Subscription-3
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "AMF"},
"validityTime":"2025-06-12T08:56:23.382Z"
}
                  Subscription-3 does not match with Subscription-1 as the value of
                    subscrCond is different. NRF creates a new subscription. Hence,
                subscription response returns the new subscriptionId.
                  
Use Case-4:- When the value of allowDuplicateSubscriptions value is
                set to true and same subscription request than existing ones
                  
NRF does not check for duplicate subscription and creates a new subscription.
Existing Subscription with NRF:
Subscription-1
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"subscriptionId":"54d05ee9d3c042b0bf1499463cf53fe0",
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-01-18T08:56:23.382Z"
}
                  New NFStatusSubscribe Request:-
Subscription-2
{
"nfStatusNotificationUri":http://notification-url.oracle.com/subscribe/notification,
"subscriptionId":"54d05ee9d3c042b0bf1499463cf53fe0",
"reqNotifEvents":["NF_REGISTERED","NF_PROFILE_CHANGED"],
"subscrCond":{"nfType" : "UDM"},
"validityTime":"2025-06-12T08:56:23.382Z"
}
                  Subscription-2 matches exactly with Subscription-1 except
                    validityTime, NRF creates a new subscription. Hence,
                subscription response returns the new subscriptionId.