Conversation
A basic queueing forwarder built around `java.net.http` classes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48e43fd8fb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| case 200: | ||
| responseOk++; | ||
| onSuccess(); | ||
| break; | ||
| default: |
There was a problem hiding this comment.
Treat all 2xx responses as successful deliveries
The success branch only handles status 200, so valid POST success responses such as 202 or 204 are treated as failures and sent through retry/backoff. In environments where the intake endpoint returns non-200 2xx codes, this will repeatedly requeue payloads until maxTries is exceeded and data is dropped, even though the server already accepted the request.
Useful? React with 👍 / 👎.
| HttpRequest.Builder builder = | ||
| HttpRequest.newBuilder(url).POST(BodyPublishers.ofByteArray(payload)); |
There was a problem hiding this comment.
Configure an HTTP request timeout on outbound sends
The request is built without HttpRequest.Builder.timeout(...), so only connection establishment is bounded while the response wait can block forever. If an upstream accepts the connection but never responds, client.send can hang the single forwarding thread indefinitely, causing queue growth until callers block (WhenFull.BLOCK) or payloads are evicted (WhenFull.DROP).
Useful? React with 👍 / 👎.
A basic queueing forwarder for dogstatsd http payloads built around
java.net.httpclasses.