Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3795

Send notifications to “platform.notifications.ingress”

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      After filtering the notifications to be sent by customer, we need to send a message to the kafka topic "platform.notifications.ingress" in an isolated transaction. So, if the message fails to be sent, we nack the utilization summary message to be later reprocessed again.

      More information about how to send the notifications and the message structure: https://inscope.corp.redhat.com/docs/default/component/notifications-app/user-guide/send-notification/

      Changes:

      • Add Maven dependency to https://mvnrepository.com/artifact/com.redhat.cloud.common/insights-notification-schemas-java, to get the message schema.
      • Ensure we fulfill the message correctly
      • Use the service from SWATCH-3794 to set the message UUID.
      • Validate the payload to ensure we're sending all the required fields (orgID, metric, value, subscriptionNumber, ...)
      • Send message to the Kafka topic if the feature flag "swatch.swatch-notifications.send-notifications" is enabled. Otherwise, add an INFO log statement clearly saying that the notification was not sent because it's disabled.
      • Update the clowder definition to declare this Kafka topic
      • Create this topic into the docker-compose.yml file as well (otherwise, it won't be created when running the component tests locally)

      For refinement: provide more information about how to properly set the message. More information after https://issues.redhat.com/browse/RHCLOUD-26268 is done

      Acceptance Criteria

      • Add component test to verify we send the message to this kafka topic.

              Unassigned Unassigned
              jcarvaja@redhat.com Jose Carvajal Hilario
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: