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

Add tally snapshot consumer in swatch-contracts to set the capacity

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-contracts
    • None

      This task involves modifying the swatch-contracts service to consume messages from the "platform.rhsm-subscriptions.tally" topic in batches.

      The changes will include:

      • Configure swatch-contracts to consume messages from the platform.rhsm-subscriptions.tally topic in configurable batches. The new consumer must be configured using the following property:
      mp.messaging.incoming.tally-in.auto.offset.reset=latest
      

      This is the default configuration, but it's better to be explicit here. The idea is to only consume the new messages.

      • Capacity Query Optimization: For each batch of consumed messages, a single query will be executed to retrieve the necessary capacity information using the existing "subscription_capacity_view". This will reduce the load on the database or external service providing capacity data.
      • Batch Response Sending: After processing the capacity for the entire batch, a corresponding batch of responses will be sent to the platform.rhsm-subscriptions.utilization topic.

      Acceptance Criteria

      • Added new data model called UtilizationSummary that includes the snapshot summary data plus the capacity data from the query
      • New component tests are implemented to verify the end-to-end batch processing functionality

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

                Created:
                Updated: