...
- Consume Event
- Check if dataCategory is 'CM'
- log consumption
- Check scheme
- Create object
- Log object
Drawio |
---|
border | true |
---|
| |
---|
diagramName | Untitled Diagram |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 511 |
---|
revision | 1 |
---|
|
Consumer Pseudo Code
Code Block |
---|
title | Pseudo Code |
---|
collapse | true |
---|
|
public class SubscriptionCreatedEventConsumer {
@KafkaListener(topics = "${app.ncmp.cm-avc-subscription.topic}") //Blocking: See issue #2
public void consumeSubscriptionEvent(final SubscriptionCreatedEvent subscriptionCreatedEvent){
if(subscriptionCreatedEvent.dataCategory == 'CM'){ //Check dataCategory
log.debug(consuming"Consuming event subscriptionCreatedEvent{} ...", subscriptionCreatedEvent);
if(checkFormat(subscriptionCreatedEvent)){ //Check format of message
Subscription createSubscription = new Subscription() //Create Object
log.debug("subscription created "+ createSubscription) //Log subscription
}
}
}
public boolean checkFormat(SubscriptionCreatedEvent event){
//DetermineBlocking: whenSee schemaissue confirmed#1
}
}
|
Subscription Object - Will be finalised when schema confirmed
...
Issues & Decisions
# | Issue | Notes | Decision |
---|
1 | Subscription Event Scheme | Protocol : Kafka Event Topic : variable topic name Code Block |
---|
title | Event Scheme |
---|
collapse | true |
---|
| {
"version": "<event type version>",
"eventType": "subscriptionCreated",
"event": {
"subscription": {
"clientID": "<unique identifier for the client >",
"name": "<unique subscription name per client>",
"isTagged": "<yes|no>, optional parameter, default is no"
},
"dataType": {
"dataspace": "<data space>",
"dataCategory": "<data category type>",
"dataProvider": "<data provider type>"
"schemaName": "<schema name>"
"schemaVersion": "<schema version>"
},
"predicates": {
"<parameter>": "<value>",
"param2": [
"value21",
"value22"
]
}
}
} |
| |
---|
2 | Configurable Topic | Pointer where previously implemented |
|
---|