Skip to content

Conversation

@Ian-Nara
Copy link
Contributor

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

New :

  • DeltaProduceJobStatus.java - tracks lifecycle and state of asyc job
  • SqsBatchProcessor.java - Applies parsing, validation, filtering, and deletion of corrupted SQS messages
  • SqsWindowReader.java - Reads messages from SQS for complete 5-minute time windows

Modified:

  • OptOutSqsLogProducer.java - Changed from synchronous to asynchronous delta production flow
  • SqsMessageParser.java - Removed: filterEligibleMessages() method (moved to SqsBatchProcessor)
  • DeltaProductionResult.java - Added additional processing metadata
  • Const.java - Added config for job duration timeout

@Ian-Nara Ian-Nara marked this pull request as ready for review December 2, 2025 04:03
@Ian-Nara Ian-Nara marked this pull request as draft December 2, 2025 04:04
…-UID2-6146-update-traffic-calculator-to-hardcoded-baseline
…seline' into ian-UID2-6151-add-traffic-filter-class
@Ian-Nara Ian-Nara marked this pull request as ready for review December 2, 2025 06:47
@Ian-Nara Ian-Nara requested a review from caroline-ttd December 2, 2025 20:51
private final boolean stoppedDueToRecentMessages;

public DeltaProductionResult(int deltasProduced, int entriesProcessed) {
public DeltaProductionResult(int deltasProduced, int entriesProcessed, boolean stoppedDueToRecentMessages) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we add a comment here explaining what stoppedDueToRecentMessages means? We might forget the context after a while.

Comment on lines +15 to +18
private volatile JobState state;
private volatile JsonObject result;
private volatile String errorMessage;
private volatile Instant endTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why volatile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

State is read from the event loop thread and is written from the (single possible) worker thread caused by execute blocking.

The event loop just reads the status occasionally; the worker thread can write to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

job.encode() to send the response is in the status handler, and job.complete(result) is in the blocking, worker thread code.

Ian-Nara and others added 5 commits December 5, 2025 14:41
@Ian-Nara Ian-Nara merged commit 4360068 into main Dec 6, 2025
4 checks passed
@Ian-Nara Ian-Nara deleted the ian-UID2-6337-asynchronous-full-queue-process branch December 6, 2025 00:38
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.

4 participants