-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add SQS message processing components #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add SQS utilities for delta production: - SqsBatchProcessor: Batch parsing, validation, and filtering - SqsMessageOperations: SQS receive/delete operations and queue attributes - SqsMessageParser: Parse and sort SQS messages by timestamp - SqsParsedMessage: Data class for parsed opt-out messages - SqsWindowReader: Reads messages for complete 5-minute time windows
| JsonObject body = new JsonObject(message.body()); | ||
| String identityHash = body.getString("identity_hash"); | ||
| String advertisingId = body.getString("advertising_id"); | ||
| String traceId = body.getString("trace_id"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need the uid_trace_id for helping the debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We store uid_trace_id into trace_id on the sqs message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we writing uid_trace_id into the trace_id field on the SQS messages? will it be confusing?
Should the optout service have its own trace_id, with uid_trace_id acting as the end-to-end identifier across the whole flow (tc-portal → operator → optout)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need an opt-out-specific ID. The sqs messageID allows us to correlate the enqueue / dequeue operations already, and no harm in reusing the tcportal/operator trace right? Maybe we just rename the field uid_trace_id?
d9e2641 to
6e9fa46
Compare
6e9fa46 to
bbda3f2
Compare
Add new test files for SqsMessageOperations and SqsWindowReader
…p reason, not boolean)
Add SQS utilities for delta production: