Skip to content

Conversation

@Ian-Nara
Copy link
Contributor

@Ian-Nara Ian-Nara commented Dec 9, 2025

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

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
@Ian-Nara Ian-Nara marked this pull request as ready for review December 9, 2025 00:45
JsonObject body = new JsonObject(message.body());
String identityHash = body.getString("identity_hash");
String advertisingId = body.getString("advertising_id");
String traceId = body.getString("trace_id");
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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)?

Copy link
Contributor Author

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?

@Ian-Nara Ian-Nara force-pushed the ian-UID2-6345-sqs-components branch from d9e2641 to 6e9fa46 Compare December 10, 2025 03:43
@Ian-Nara Ian-Nara force-pushed the ian-UID2-6345-sqs-components branch from 6e9fa46 to bbda3f2 Compare December 10, 2025 03:55
@Ian-Nara Ian-Nara merged commit ffaf940 into main Dec 10, 2025
4 checks passed
@Ian-Nara Ian-Nara deleted the ian-UID2-6345-sqs-components branch December 10, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants