An MSGin5G Client or an Application Server can subscribe one or more Messaging Topic(s) on the MSGin5G Server. The Messaging Topic IE will be populated by the Application Client or the Application Server and the content of this IE is out of scope.
When an MSGin5G Client or an Application Server is subscribed to a Messaging Topic, then the MSGin5G Server will deliver messages that contain the same Messaging Topic to the subscriber.
Figure 8.8.1-1 shows the MSGin5G Client/Application Server subscribing to Messaging Topic(s) on the MSGin5G Server.
Pre-conditions:
The MSGin5G Client or Application Server has registered to the MSGin5G Server.
The MSGin5G Client or Application Server sends a Messaging Topic subscription request to the MSGin5G Server. The request includes the information elements listed in Table 8.8.1-1.
The service identity of the sending MSGin5G Client or the sending Application Server.
Messaging Topic
M
A list of Messaging Topic(s) that is to be subscribed. The number of Messaging Topic(s) included in this IE can be one or more.
Expiration
O
The date and time when the subscription expires.
This date and time apply to all Messaging Topic(s) subscribed in this request.
If this IE is included, the value of it should be larger than 0.
If this IE is not included, the expiration time is subject to operator policy.
NOTE:
The content of the Messaging Topic is out of scope of the present document.
The MSGin5G Server validates the Messaging Topic subscription request and checks the local stored Messaging Topic(s).
If the subscribed Messaging Topic has already been created, the MSGin5G Server checks whether the UE Service ID/AS Service ID of the subscriber is already included in the subscribers list of this Messaging Topic.
If not, the MSGin5G Server adds the UE Service ID/AS Service ID of the subscriber to the subscribers list of this Messaging Topic. The MSGin5G Server sets the validity time of this subscription to the value of the Expire IE or to a default value according to the service policy.
Else, the MSGin5G Server updates the validity time of this subscription.
If the subscribed Messaging Topic has not been already created, the MSGin5G Server creates this Messaging Topic, and adds the UE Service ID/AS Service ID of the subscriber to the subscribers list of this Messaging Topic. The MSGin5G Server sets the validity time of this subscription to the value of the Expire IE or to a default value according to the service policy.
The MSGin5G Server sends a Messaging Topic Subscription response to the originator of the request. The response includes the information listed in Table 8.8.1-2.
If an MSGin5G Client or an Application Server is in the subscribers list of a Messaging Topic, the MSGin5G Server delivers messages that contain this Messaging Topic to it.
Figure 8.8.2-1 shows the Message delivery to a subscribing service endpoint based on Messaging Topic.
Pre-conditions:
The MSGin5G Client or Application Server subscribed to a Messaging Topic with the MSGin5G Server. A Messaging Topic with the UE Service ID/AS Service ID of the subscriber has been created.
The MSGin5G Server receives an MSGin5G message request or an API message request corresponding to step 2 in Figure 8.3.2-1 or Figure 8.3.2-2 which includes the IEs as listed in Table 8.3.2-1. The MSGin5G message request or API message request contains a Messaging Topic IE corresponding to the Messaging Topic for which the subscription exists.
The MSGin5G Server uses the procedure described in clause 8.3.3 to deliver the message to all subscriber(s) of this Messaging Topic. In each outbound message, the UE Service ID/AS Service ID of subscriber should be added as the Recipient UE Service ID/AS Service ID IE specified in Table 8.3.3-1.
Corresponding to message topic unsubscription, an MSGin5G Client or an Application Server can unsubscribe one or more Messaging Topic(s) on the MSGin5G Server.
Figure 8.8.3-1 shows the MSGin5G Client/Application Server unsubscribing to Messaging Topic(s) on the MSGin5G Server.
Pre-conditions:
The MSGin5G Client or Application Server has subscribed one or more message topic(s) on the MSGin5G Server.
The MSGin5G Client or Application Server sends a Messaging Topic unsubscription request to the MSGin5G Server. The request includes the information listed in Table 8.8.3-1.
The MSGin5G Server validates the Messaging Topic unsubscription request and checks the local stored Messaging Topic(s). If the subscribed Messaging Topic has already been created and if the UE Service ID/AS Service ID of the subscriber is already included in the subscribers list of this Messaging Topic, the MSGin5G Server removes the UE Service ID/AS Service ID from the subscribers list of this Messaging Topic.
The MSGin5G Server sends a Messaging Topic Unsubscription response to the originator of the request. The response includes the information listed in Table 8.8.3-2.
When Messaging Topic(s) is handled between different MSGin5G Servers, the MSGin5G Server 1 may work in the following models:
Mod.A: the MSGin5G UE/Application Server served by MSGin5G Server 1 subscribes Messaging Topic(s) on MSGin5G Server 2 directly. In this case, the MSGin5G Server 1 forwards Messaging Topic subscription request from the MSGin5G UE/Application Server served by it to MSGin5G Server 2 or
Mod.B: the MSGin5G Server 1 subscribes the Messaging Topic(s) on behalf of all MSGin5G UE/Application Server served by it.
The MSGin5G Server may work in one model based on the service policy. The MSGin5G Server 1 and MSGin5G Server 2 can be located in the same PLMN or different PLMNs.
Before the subscribing of Messaging Topic(s), the MSGin5G Server 1 should obtain the available Messaging Topic list on the MSGin5G Server 2 to determine whether forwards the Messaging Topic subscription request to MSGin5G 2, or subscribes Messaging Topic on behalf of all MSGin5G UE/Application Server served by it on MSGin5G Server 2.
Figure 8.8.4.2-1 shows the MSGin5G Server 1 subscribing to Messaging Topic list on the MSGin5G Server 2.
Pre-conditions:
MSGin5G Server 1 and MSGin5G Server 2 have established a secured connection.
The MSGin5G Server 1 sends a Messaging Topic list subscription request to the MSGin5G Server 2. The request includes the information elements listed in Table 8.8.4.2-1.
The MSGin5G Server which subscribes the Messaging Topic list.
Security credentials
O
Security information required by the MSGin5G Server 2. If the MSGin5G Server 1 and MSGin5G Server 2 are located in the same PLMN, this information element is not mandatory.
This is a placeholder for SA3 security information.
Expiration
O
The date and time when the subscription expires.
If this IE is included, the value of it should be larger than 0.
If this IE is not included, the expiration time is subject to operator policy.
The MSGin5G Server 2 sends a Messaging Topic list Subscription response to MSGin5G Server 1. The response includes the information listed in Table 8.8.4.2-2.
The MSGin5G Server 2 checks whether Messaging Topic list notification is needed, e.g. whether the MSGin5G Server 1 subscribes the Messaging Topic list on MSGin5G Server 2 for the first time, or the local Messaging Topic(s) on the MSGin5G Server 2 are updated, e.g. new Messaging Topic(s) has been created or existing Messaging Topic(s) has been deleted.
If Messaging Topic list notification is needed, the MSGin5G Server 2 sends a Messaging Topic list notification request to MSGin5G Server 1. The request includes the information listed in Table 8.8.4.2-3.
The new validity date and time of this subscription set by the MSGin5G Server 2.
>Messaging Topic list
M
A list of Messaging Topic(s) that is(are) existing on the MSGin5G Server 2.
If the MSGin5G Server 1 subscribes the Messaging Topic list on MSGin5G Server 2 for the first time, the MSGin5G Server 2 should include all Messaging Topic(s) that is(are) existing on the MSGin5G Server 2 in this Messaging Topic list notification, else the MSGin5G Server 2 includes the deviation of Messaging Topic(s) since the last notification,
Each element in this list contains information as specified in Table 8.8.4.2-4.
Based on the service, the MSGin5G Server 2 may only choose a part of Messaging Topic(s) which are allowed to be subscribe by MSGin5G Server 1 in the notification.
If the MSGin5G Server 1 works in Mod.A, upon receiving a Messaging Topic subscription request from MSGin5G Client or Application Server, if the Messaging Topic is included in the Messaging Topic list of MSGin5G Server 2, the MSGin5G Server 1 forwards the Messaging Topic subscription request to MSGin5G Server 2, Otherwise the MSGin5G Server 1 handles the Messaging Topic subscription request as specified in clause 8.8.1.
If the MSGin5G Server 1 works in Mod.B, upon receiving a Messaging Topic subscription request from MSGin5G Client or Application Server, if the Messaging Topic is not included in the Messaging Topic list of MSGin5G Server 2, the MSGin5G Server 1 handles the Messaging Topic subscription request as specified in clause 8.8.1. Otherwise it may subscribe one or more Messaging Topic(s) from the Messaging Topic list by using the procedure specified in clause 8.8.1 with the clarification listed below:
Originating UE Service ID/AS Service ID (see NOTE 1)
O
The service identity of the sending MSGin5G Client or the sending Application Server.
This IE should be included if MSGin5G Server 1 forwards Messaging Topic subscription request from the MSGin5G UE/Application Server served by it to MSGin5G Server 2.
MSGin5G Server address (see NOTE 1)
O
The MSGin5G Server which subscribes the Messaging Topic(s).
This IE should be included if MSGin5G Server 1 subscribe the Messaging Topic on behalf of all MSGin5G UE/Application Server served by it.
Security credentials
O
Security information required by the MSGin5G Server 2. If the MSGin5G Server 1 and MSGin5G Server 2 are located in the same PLMN, this information element is not mandatory.
This is a placeholder for SA3 security information.
Messaging Topic (see NOTE 2)
M
A list of Messaging Topic(s) that is to be subscribed. The number of Messaging Topic(s) included in this IE can be one or more.
Expiration
O
The date and time when the subscription expires.
This date and time apply to all Messaging Topic(s) subscribed in this request.
If this IE is included, the value of it should be larger than 0.
If this IE is not included, the expiration time is subject to operator policy.
NOTE 1:
Only one of these IEs shall be included.
NOTE 2:
The content of the Messaging Topic is out of scope of the present document.
The MSGin5G Server 2 handles the Originating UE Service ID/AS Service ID or MSGin5G Server address included in the Messaging Topic subscription request as the UE Service ID/AS Service ID included in Table 8.8.1-1.
If the MSGin5G Server 1 works in Mod.A, upon receiving a Messaging Topic unsubscription request from MSGin5G Client or Application Server, if the Messaging Topic is included in the Messaging Topic list of MSGin5G Server 2, the MSGin5G Server 1 forwards the Messaging Topic unsubscription request to MSGin5G Server 2, Otherwise the MSGin5G Server 1 handles the Messaging Topic unsubscription request as specified in clause 8.8.1.
If the MSGin5G Server 1 works in Mod.B, it may also unsubscribe one or more Messaging Topic(s) from the Messaging Topic list by using the procedure specified in clause 8.8.3 with the clarification listed below:
Originating UE Service ID/AS Service ID (see NOTE 1)
O
The service identity of the sending MSGin5G Client or the sending Application Server.
This IE should be included if MSGin5G Server 1 forwards Messaging Topic unsubscription request from the MSGin5G UE/Application Server served by it to MSGin5G Server 2.
MSGin5G Server address (see NOTE 1)
O
The MSGin5G Server which unsubscribes the Messaging Topic(s).
This IE should be included if MSGin5G Server 1 subscribe the Messaging Topic on behalf of all MSGin5G UE/Application Server served by it.
Security credentials
O
Security information required by the MSGin5G Server 2. If the MSGin5G Server 1 and MSGin5G Server 2 are located in the same PLMN, this information element is not mandatory.
This is a placeholder for SA3 security information.
Messaging Topic
M
A list of Messaging Topic(s) that is to be unsubscribed. The number of Messaging Topic(s) included in this IE can be one or more.
The MSGin5G Server 2 handles the Originating UE Service ID/AS Service ID or MSGin5G Server address included in the Messaging Topic unsubscription request as the UE Service ID/AS Service ID included in Table 8.8.3-1.