POC Draft: billable usage kstream poc #3012
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing:
./gradlew :swatch-producer-azure:quarkusDev
Create two billable usages below :
key: org123
{"org_id":"org123","billing_provider":"azure","billing_account_id":"testing;testing","snapshot_date":"2024-01-24T17:00:19.007433Z","product_id":"rhel-for-x86-els-payg","sla":"Premium","usage":"Production","uom":"vCPUs","value":"1.0"}
Wait 10 seconds:
Create another messages like below:
key: org123
{"org_id":"org123","billing_provider":"azure","billing_account_id":"test;test","snapshot_date":"2024-01-24T17:00:19.007433Z","product_id":"rhel-for-x86-els-payg","sla":"Standard","usage":"Development/Test","uom":"vCPUs","value":"3.0"}
The new message coming in should trigger the window to close for the previous usages and a log should display with a billable usage value of 2 for the "Production" usage.