Standing-Man opened a new pull request, #3657: URL: https://github.com/apache/iggy/pull/3657
## Which issue does this PR address? <!-- We generally require a GitHub issue for all bug fixes and enhancements. Link it with GitHub syntax, keep the line that applies and delete the other: - `Closes #123` auto-closes the issue when this PR merges (full fix). - `Relates to #123` links without closing (partial or related work). --> - Closes #2484. ## Rationale <!-- Why is this change needed? If the issue explains it well, a one-liner is fine. --> The Flink source already communicates with Iggy over TCP, while the sink still uses HTTP and hardcodes port `3000`. This causes the same `IggyConnectionConfig` to behave differently between the source and sink. For example, a configured address such as `iggy:8090` is used directly by the source, but the sink discards the configured port and connects to the HTTP endpoint instead. ## What changed? <!-- 2-4 sentences. Problem first (before), then solution (after). GOOD: "Messages were unavailable when background message_saver committed the journal and started async disk I/O before completion. Polling during this window found neither journal nor disk data. The fix freezes journal batches in the in-flight buffer before async persist." GOOD: "When many small messages accumulate in the journal, the flush passes thousands of IO vectors to writev(), exceeding IOV_MAX (1024 on Linux)." BAD: - Walls of text - "This PR adds..." (we can see the diff) --> - Replaced `IggyHttpClient` with the blocking `IggyTcpClient` in the Flink sink. - Updated `IggySink` to create, connect, and authenticate the TCP client using the configured server address. - Added support for the configured connection timeout, request timeout, retry policy, and TLS setting. - Used port `8090` as the default when the server address does not include a port. - Updated `IggySinkWriter` to send message batches through the TCP client. - Updated the writer lifecycle to flush buffered messages and close the TCP connection, while preserving both flush and close errors when they occur together. ## Local Execution - Passed / not passed - Pre-commit hooks ran / not ran <!-- You must run your code locally before submitting. "Relying on CI" is not acceptable - PRs from authors who haven't run the code will be closed. Did you have `prek` installed? It runs automatically on commit and covers all project languages. See [CONTRIBUTING.md](https://github.com/apache/iggy/blob/master/CONTRIBUTING.md). --> ## AI Usage <!-- If AI tools were used, please answer: 1. Which tools? (e.g., GitHub Copilot, Claude, ChatGPT) 2. Scope of usage? (e.g., autocomplete, generated functions, entire implementation) 3. How did you verify the generated code works correctly? 4. Can you explain every line of the code if asked? If no AI tools were used, write "None" or delete this section. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
