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