Hey
@Jonathan Goldberg,
I've just refreshed myself on TMF630 and the hub/listener model and i still have a similar query to Shabad had in the first instance.
The model that is defined to respond to a POST /api/hub as below make sense as its telling the API client "this is the hub i have created for you and i confirm this is the URL you have supplied for me".
"EventSubscription": {
"type": "object",
"description": "Sets the communication endpoint address the service instance must use to deliver notification information",
"required": [
"id",
"callback"
],
"properties": {
"id": {
"type": "string",
"description": "Id of the listener"
},
"callback": {
"type": "string",
"description": "The callback being registered."
},
"query": {
"type": "string",
"description": "additional data to be passed"
}
}
}
However when a look at the listener endpoints that are defined in the swagger for 641 (v4.1.0) then i see that they also suggest that in the success scenario (201) that they should return the EventSubscription model.
This doesnt make any sense to me as these are endpoints implemented by the client and i dont know why the client would be returning back to the server the unique id of its callback address that has been generated by the server. unfortunately the version of TMF630 (4.2.0) that aligns with 641 v4.1.0 stops short of actually showing an example of the response from the client to the server in section 10.3. I feel like this is a bug in the TMF641 schema and the client should probably not be asked to return any body content at all.
Am i misunderstanding here or do you think this is a schema issue?
------------------------------
David Whitfield
TalkTalk Group
------------------------------
Original Message:
Sent: Apr 24, 2022 07:08
From: Jonathan Goldberg
Subject: TMF 641 - Notification listener (client side) APIs
Hi all
Please note that the hub pattern is entrenched in (almost) all the TMF Open APIs, and is described in the Design Guidelines TMF630.
The hub pattern allows consumers of API operations to register to receive events that occur as a result of operation invocation, for example entity created, entity deleted, state changed, etc., as in the TMF641 example quoted above by GB Aswath.
The hub pattern is inherently point-to-point. An alternative is to use true eventing, abstracted by the Event Management API TMF688.
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
Original Message:
Sent: Apr 21, 2022 01:30
From: G B Aswath
Subject: TMF 641 - Notification listener (client side) APIs
The callback
is a URL of client which is used by server / sender to push notifications to its registered consumers / clients. TMF 641 supports following notifications
- OrderCreationNotification
- OrderRemoveNotification
- OrderStateChangeNotification
- OrderValueChangeNotification
- OrderInformationRequiredNotification
Consumer /Client can registered for any / all of the above notifications which can be supplied in query
parameter along with URL to which server should post this notifications should be given in callback
during above event registration process.
------------------------------
G B Aswath
NMSWorks Software Pvt. Ltd.
Original Message:
Sent: Apr 19, 2022 11:11
From: Shabad Mathur
Subject: TMF 641 - Notification listener (client side) APIs
I am pretty new with the APIs.
While implementing notification listener (client side) APIs I have observed that 201 response payload always have a "callback" attribute.
I am just curious to know what is the purpose of this "callback" ?
From the swagger I could see it mentions, callback is to register, what kind of this registration is ?
EventSubscription {
description:
|
Sets the communication endpoint address the service instance must use to deliver notification information
|
id*
|
string
Id of the listener
|
callback*
|
string
The callback being registered.
|
query
|
string
additional data to be passed
|
}
------------------------------
Shabad Mathur
Zensar Technologies
------------------------------