-
Story
-
Resolution: Done
-
Medium
-
None
Publish data update event:
When to send:
- The notification feature is enabled in the configuration. By default, this feature should be disabled.
- Any write operation happens on the data node (except deletion).
What to send:
- the entire data from the root node even if the operation changed the values for a child data node.
How to send:
- Implement Kafka Producer using spring annotations
- The Kafka topic name is configurable. (agree and following ONAP convention names)
- Message key uses a combination of dataspace and anchor to identify the right partition.
- Implement security using the Kafka properties.
Spring Kafka Documentation:
Examples: https://www.confluent.io/blog/apache-kafka-spring-boot-application and https://www.baeldung.com/spring-kafka
Reference - https://docs.spring.io/spring-kafka/reference/html/#sending-messages
AC:
- CPS is sending Data Updated Event to Kafka topic and the messages are in the format defined in https://wiki.onap.org/display/DW/CPS-191%3A+Core+and+Temporal+Integration+Design
- CPS Kafka client is authenticated
- Messages are sent if enabled
- All the messages for an anchor are sent to the same partition
- Demo locally (manual)
Out of scope:
- Automatic integration tests