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

Translate HBI messages into swatch's Event message schema

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-metrics-hbi
    • 5
    • False
    • Hide

      None

      Show
      None
    • True

      As a developer,
      I want translate HBI event messages into Swatch's event message schema after consuming them and produce event messages to the service-instance-ingress topic,
      So that the necessary data is processed correctly and adheres to the event schema requirements.

       

      Refer to https://docs.google.com/document/d/1Kdk0Bm8Al_1-O8oDPmvnR8SjYHZKn8J24U7SuiuDD9Y/edit from SWATCH-2850.

      Acceptance Criteria:

      1. Message Consumption:
        • The Quarkus app shouldn't just log the raw HBI ** messages anymore
        • Message types (create, update, delete) are correctly identified and carried over.
          • likely will need Event schema update to support this
      2. Message Translation:
        • The HBI message is successfully translated into Swatch's event message schema.
        • The appropriate service_type is assigned (HBI_HOST).
        • Lookup and apply appropriate product_tag
      1. Kafka Producer:
        • The Quarkus app successfully produces swatch Event messages to the service-instance-ingress topic when the Unleash feature flag from SWATCH-2924 is enabled.
      2. Message consumption 
        • swatch-tally consumes the message, sends it through its usual Event Ingestion pipeline, and results in an event database record being inserted
        • Event Ingestion/Reconciliation should behave in its usual way (aka no regressions in current dedup logic)
      3. Verify hourly tally doesn't pick up these event records
        • they shouldn't because the events will have a service type of HBI_HOST, and there are no swatch-product configs that match HBI_HOST
      4. Automated Testing
        • Add component tests for new swatch-metrics-hbi
          • happy path test with a life-like example of an HBI event compared with the swatch Event emitted by swatch-metric-hbi
        • Functional test
          • when swatch-metrics-hbi emits an Event, swatch-tally consumes it and ends up in the event table in the database

              mstead@redhat.com Michael Stead
              lburnett0 Lindsey Burnett
              Lisa Walker Lisa Walker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: