-
Notifications
You must be signed in to change notification settings - Fork 7
update sqs log producer with circuit breaker #276
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
Merged
Ian-Nara
merged 24 commits into
main
from
ian-UID2-6345-update-sqs-log-producer-with-circuit-breaker
Dec 14, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a74dfed
update to use DeltaProductionOrchestrator
Ian-Nara eeeebf6
update comment
Ian-Nara 52558a5
update comments
Ian-Nara 07cf7e3
comment updates
Ian-Nara 95dd7d5
rename trace_id to uid_trace_id
Ian-Nara 6b4350f
add queue size limit
Ian-Nara e86adc4
refactor to non-deprecated version of executeblocking
Ian-Nara 8b7ccb7
add note
Ian-Nara 89fff06
[CI Pipeline] Released Snapshot version: 4.5.1-alpha-129-SNAPSHOT
3adf35d
add missing dependency for new shared version
Ian-Nara 6dccdac
[CI Pipeline] Released Snapshot version: 4.5.1-alpha-130-SNAPSHOT
3f2d09e
reset pom version
Ian-Nara 3c7c275
[CI Pipeline] Released Snapshot version: 4.5.1-alpha-132-SNAPSHOT
3379660
add debugging info
Ian-Nara fb99b65
[CI Pipeline] Released Snapshot version: 4.5.2-alpha-133-SNAPSHOT
7975de7
Merge branch 'ian-UID2-6345-update-sqs-log-producer-with-circuit-brea…
Ian-Nara e2478bb
[CI Pipeline] Released Snapshot version: 4.5.3-alpha-134-SNAPSHOT
a124eeb
reset pom.xml version
Ian-Nara 0a6f8fa
remove unused parameter
Ian-Nara 72d0126
updating comment format
Ian-Nara 377680e
add default config values
Ian-Nara 2e043b1
[CI Pipeline] Released Snapshot version: 4.5.1-alpha-135-SNAPSHOT
947a8ff
removd deubg logs
Ian-Nara 3c7b595
reset pom version
Ian-Nara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
src/main/java/com/uid2/optout/util/HttpResponseHelper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| package com.uid2.optout.util; | ||
|
|
||
| import io.vertx.core.http.HttpHeaders; | ||
| import io.vertx.core.http.HttpServerResponse; | ||
| import io.vertx.core.json.JsonObject; | ||
|
|
||
| /** | ||
| * Utility class for HTTP JSON response handling. | ||
| * Ensures consistent response format across handlers. | ||
| */ | ||
| public class HttpResponseHelper { | ||
|
|
||
| /** | ||
| * Send a JSON response with the specified status code. | ||
| */ | ||
| public static void sendJson(HttpServerResponse resp, int statusCode, JsonObject body) { | ||
| resp.setStatusCode(statusCode) | ||
| .putHeader(HttpHeaders.CONTENT_TYPE, "application/json") | ||
| .end(body.encode()); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 200 OK response with JSON body. | ||
| */ | ||
| public static void sendSuccess(HttpServerResponse resp, JsonObject body) { | ||
| sendJson(resp, 200, body); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 200 OK response with status and message. | ||
| */ | ||
| public static void sendSuccess(HttpServerResponse resp, String status, String message) { | ||
| sendJson(resp, 200, new JsonObject().put("status", status).put("message", message)); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 200 OK response with idle status and message. | ||
| */ | ||
| public static void sendIdle(HttpServerResponse resp, String message) { | ||
| sendJson(resp, 200, new JsonObject().put("status", "idle").put("message", message)); | ||
| } | ||
| /** | ||
| * Send a 202 Accepted response indicating async job started. | ||
| */ | ||
| public static void sendAccepted(HttpServerResponse resp, String message) { | ||
| sendJson(resp, 202, new JsonObject().put("status", "accepted").put("message", message)); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 409 Conflict response. | ||
| */ | ||
| public static void sendConflict(HttpServerResponse resp, String reason) { | ||
| sendJson(resp, 409, new JsonObject().put("status", "conflict").put("reason", reason)); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 500 Internal Server Error response. | ||
| */ | ||
| public static void sendError(HttpServerResponse resp, String error) { | ||
| sendJson(resp, 500, new JsonObject().put("status", "failed").put("error", error)); | ||
| } | ||
|
|
||
| /** | ||
| * Send a 500 Internal Server Error response from an exception. | ||
| */ | ||
| public static void sendError(HttpServerResponse resp, Exception e) { | ||
| sendError(resp, e.getMessage()); | ||
| } | ||
| } | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Thank you Ian for the update!