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

Store outbox records for all SWatch events instead of sending messages.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • Next - API
    • None
    • swatch-metrics-hbi
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • True
    • subs-swatch-thunder

      When processing an HBI event message, each of the resulting SWatch events should be stored as an outbox record instead of being sent as a message to the platform.rhsm-subscriptions.event-ingress topic.

      For a single incoming HBI event message, any updates to the hbi_host_relationship records and creation of outbox records should be encapsulated in a single DB transaction. If the DB transaction fails, the HBI event message should be retried.

      See the DESIGN DOCUMENT for further information.

      Required Testing

      • Verify that after processing an HBI event, the applicable relationships are updated and outbox records are created for any SWatch event messages that are to be sent.
        • Existing component tests should be updated to:
          • Verify the expected number of outbox records are created.
          • Verify that the event data that is stored in the outbox records match the expected Swatch events that are being asserted by the current tests (no longer checking the swatch event topic).
      • Verify that on any error, neither changes to the hbi_host_relationship OR the new outbox records are persisted and that the HBI event is retried.

      Acceptance Criteria

      • After processing an HBI event, outbox records should be stored and no SWatch event messages should be sent.
      • Testing requirements are met.

              mstead@redhat.com Michael Stead
              mstead@redhat.com Michael Stead
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: