Hi,This is a question regarding the event processed by a listener.Background for the question …
We have a bit unconventional requirement for listening to TMF events - as described below.
a) Various clients register with a central service for TMF events they are interested in (by providing the name of the TMF API - such as 'troubleTicketManagement' among other things)b) The central service itself listens to all the above registered eventsc) The central service then forwards the received events to the various clients in a) as per registration.
The reason for the above logic is that the client applications in a) are not aware of each other, thus needing the central service.
Now for the actual question …
Our requirement is to find the TMF API name from the incoming event.
Taking the example of a received 'troubleTicket' event in 'REST API Design Guidelines Part 1', one can check the field eventType at the top level (in this case 'TroubleTicketStateChangeNotification') and then look up a table that maps each event type to the TMF API (in this case 'troubleTicketManagement'). Of course, this means creating/maintaining a large map of such entries.
I am wondering if the alternative could be as follows.
Will the above work in all cases or is there a flaw? The goal is to avoid creating/maintaining the static map mentioned above, rather extract the API name from the event.Thanks.