...
Component | Responsibilities |
---|---|
NCMP |
|
Kafka | Consumer
|
Producer
| |
Database | Subscription information |
DME |
|
Potential Challenges with Dependencies
Challenge
Service Layer Design
Mapping of events to correct subscriptions
...
format of subscription ID
format of topic name
Assumption
simple regex for the subscription id to extract topic name
(.+)#(.*)
group 1 = subscription id
group 2 = topic name
Forwarding Notification based on subscription
...
Prerequisite:
consumed event
topic name
Retry logic
Error Handling
Description | ||
---|---|---|
Dead-letter queues? | ||
No write access to kafka topic | Log failed request | |
Kafka topic does not exist | Log failed request | |
No valid topic name in subscription ID | Reject* | move up top |
Performance Considerations
NCMP
Caching
Deserializing**
regex
Kafka
Configuration on polling
Security Considerations
Data validation
Event consumed will be forwarded as is
Access control (write permissions) to topics is controlled by client
...
k6?
Scenario | Expected Result | |
---|---|---|
1 | Consume event from DMI | No error , Log info trace level ? |
2 | Publish event | Published event with correct details (topic name, event key, event) |
3 | No subscription Ids returned for certain xpath (Notification maps to no subscription) | No forwarded event Increase counter for not forwarded events |
4 | Notification maps to one subscription | Event forwarded to one topic |
5 | Notification maps to multiple subscription (no duplication on topics) | Event forwarded to more than one topic |
6 | Notification maps to two subscriptions having the same topic | Event forwarded to one topic ONLY once |
7 | No topic extracted from subscription IDlog error? | Reject event |
8 | No write access to topic | log Log error |
9 | Kafka not available? | Log error |
Monitoring and Logging
Metrics
...