References
- CPS-1492Getting issue details... STATUS
Subscription Creation Events Handling
Assumptions
# | Assumption | Notes |
---|---|---|
1 | Forwarded Subscription Event communicates asynchronously. (NCMP to DMI Plugins) | Thus, it is not required to wait for a single request to be responded. For example, NCMP has not to wait a response when Forwarded Subscription Event has been published into a topic, e.g. RequestXXX. |
2 | Forwarded Subscription Event Responses communicates asynchronously. (DMI Plugins to NCMP) | It is the same as above note. The Forwarded Subscription Event Responses published into a different topic, e.g. ResponseXXX. |
3 | The NCMP component need to keep the Request ID that is belong to each Kafka message and the timestamp when the message is published into RequestXXX topic. | |
4 | The NCMP component should consume messages periodically from ResponseXXX topic, and create Subscription Create Outcome message. | |
5 | The NCMP component should publish Subscription Create Outcome message into another topic in which Client Apps consumed from. |
Issues & Decisions
# | Issue | Notes | Decision |
---|---|---|---|
1 | Possible Topic Names (TBD) | ||
2 | Possible 'timeframe' period to consume Forwarded Subscription Create Event Responses | TBD for timeframe |
Possible Topic Names
# | Source | Content | Topic Name | Destination |
---|---|---|---|---|
1 | NCMP | Forwarded Subscription Event | TBD (cm-avc-subscription-forwarded) | DMI Plugins |
2 | DMI Plugins | Forwarded Subscription Event Response | TBD (cm-avc-subscription-forwarded-response) | NCMP |
3 | NCMP | Subscription Event Outcome | TBD (cm-avc-subscription-outcome-response) | Client Apps |
Implementation Details
- The NCMP component could utilize a Hash Map to store request_id and timestamp the time that message is published into the topic mentioned in #1 → Possible Topic Names
- In order to calculate the Subscription Create Outcome Message, the NCMP component should consume response messages from the topic mentioned in #2 → Possible Topic Names
The NCMP component should consume messages as per the timeframe periods, and compare request ids with the ones that already kept in that Hash Map at step 1. - If the incoming request id is found in the Hash Map, the total time elapsed could be calculated via timestamp (responses read) minus timestamp from Hash Map (for related request id).
- The NCMP can populate Subscription Event Outcome report, and publish it to the topic mentioned in #3 → Possible Topic Names
Testing Details
Ref: Component Diagram