I think I got the question you are asking Shubham! I have a similar doubt.
Two parts here I believe:
Part 1: The events subscription apis with a hub (with type EventSubscriptionInput
) resource which is present in all TMF OpenAPIs (I am assuming here as I haven't checked each TMF OpenAPI) including TMF688 Event Streaming API, eg:
POST /hub
DELETE /hub/{id}
And I also understand it works the way Kanika explained.
Part 2: The hub (with type Hub
) resource in TMF688 Event Streaming API which has following apis,
GET /topic/{topicId}/hub
POST /topic/{topicId}/hub
GET /topic/{topicId}/hub/{id}
DELETE /topic/{topicId}/hub/{id}
How is this hub resource supposed to be used in a Event Driven Architecture?
Is it identical to the resource from events subscription api?
Best regards,
Chandan
------------------------------
Chandan Kumar Soud
conology
------------------------------
Original Message:
Sent: May 11, 2023 02:55
From: Shubham Mittal
Subject: Query around callback urls defined in hub vs listener
hi Kanika,
Thanks for the response, i had the same understanding as yours however when i see TMF688 i see two sections in it
1) Create Hub
POST topic/{topicId}/hub
this basically returns the callback id, i assume this callback id is the id of the subscriber system who wants to be notififed about any events
2) Register listener
POST /hub
{"id":"42","callback":"http://in.listener.com","query":null} |
register listener also return the callback url so are these both processes same?
is it good to assume that listener is ultimately registering at a hub so post/hub and register listener process is kind off same
------------------------------
Shubham Mittal
ServiceNow, Inc.
Original Message:
Sent: May 11, 2023 01:43
From: Kanika Aggarwal
Subject: Query around callback urls defined in hub vs listener
Hi Shubham,
If I have understood your question correctly:
1. Publisher provides this API endpoint "POST /hub" for subscribers/listeners to register for notifications
2. Subscriber then register for notifications by posting the payload you have mentioned in your question on "POST /hub" to tell the publisher that I am interested in the notifications that meet my query criteria.
3. In this payload, callback url is the api endpoint that subscriber tells to publisher that "hey when you get something that meets my query criteria, let me know by posting that notification on this callback url"
Hope this helps.
------------------------------
Kanika Aggarwal
VOCUS PTY LTD
Original Message:
Sent: May 10, 2023 09:47
From: Shubham Mittal
Subject: Query around callback urls defined in hub vs listener
Hi All,
As i understand in TMF 688, there are two processes, one is around creating hub which i assume would be created by the party who's registering topics. in this scenario if i do a POST or a get of a hub ,i see the below
{ "callback": "http://www.tmforum.org/aListener", "id": "5880", "query": "event.alarm.alarmType=QualityOfServiceAlarm", "href": "//hub/ 5880" } |
As per the definition of the hub resource it says callback url as below
An uri (Uri). The URI that will be POSTed to when a notification is triggered. |
Now when the hub is registered, when a listener is trying to register at this hub, is the callback url mentioned above would the target url on which the listener would register their own callback url
Kindly confirm as i am little confused when i see two callback urls one in hub creation and other in listener registration
#OpenDigitalArchitecture
------------------------------
Shubham Mittal
ServiceNow, Inc.
------------------------------