Notifications related properties

File Location: docker-compose/docker-compose.yml

Property

Description

NOTIFICATION_DATASPACE_FILTER_PATTERNS: NON-EXISTING-DATASPACE
  • By default this is blank which means CPS will send notifications for all changes in all dataspaces
  • Add / modify under services.cps-and-ncmp.environment section
  • Can be set to the name of any dataspace that does not exists. the value 'NON_EXISTING_DATASPACE_ has been chosen for clarity
notification.enabled: 'true'
  • Do not modify
  • Make sure to always enabled (true) it as it is used by CPS for async / internal communications.

CPS Docker compose view : 

docker-compose (cps-and-ncmp)
cps-and-ncmp:
  container_name: cps-and-ncmp
  image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${CPS_VERSION:-latest}
  ports:
    - ${CPS_CORE_PORT:-8883}:8080
    - ${CPS_CORE_MANAGEMENT_PORT:-8887}:8081
  environment:
    notification.enabled: 'true'
    NOTIFICATION_DATASPACE_FILTER_PATTERNS: NON-EXISTING-DATASPACE

Verify if CPS-temporal notifications are disabled :

Add consumer docker-compose service for topic  "cps.data-updated-events" as below : 

docker-compose (kafka-consumer)
  consumer:
    image: taion809/kafka-cli:latest
    container_name: kafka-consumer
    command: kafka-console-consumer.sh --bootstrap-server kafka:9092 --topic cps.data-updated-events
    links:
      - kafka

Open kafka-consumer "Logs" section as below :

If CPS-temporal notifications are disabled will see warning message as "WARN [Consumer clientId=consumer-1, groupId=console-consumer-32597] Error while fetching metadata with correlation id 9 : {cps.data-updated-events=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)" else

Example Notifications logging  :

If dataspace filter patterns property is set to empty ("") or any as wild card (.*)


  • No labels