Repository navigation
[camel-4.18.x] CAMEL-26108: Fix Avro HTTP consumer host binding - #28524
Conversation
…ons on the endpoint Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 55b266d)
Use 127.0.0.2 in the test instead of looking up a non-loopback address, so it always runs, and remove trailing whitespace in the upgrade guide. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit aa2c0c3)
gnodet-bot
left a comment
There was a problem hiding this comment.
The upgrade guide note for camel-avro-rpc is placed at the wrong location.
The change is appended at the end of the file (around line 1878), which puts it under the == Upgrading Camel 4.17 to 4.18 section. However, the @since 4.18.6 Javadoc tag on AvroRpcHttpServerFactory confirms this change targets 4.18.6, so the note should be under == Upgrading from 4.18.5 to 4.18.6 (near the top of the file).
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier review — the misplaced upgrade guide section is now corrected.
✅ Upgrade guide placement — addressed. The camel-avro-rpc note is now correctly placed inside == Upgrading from 4.18.5 to 4.18.6.
Reviewing the rest of the changes:
AvroListener.java:configuration.getHost()is@Metadata(required = true)and populated viaparseURIfrom the endpoint URI — not nullable in normal operation. Theavro-ipc-jettyHttpServerconstructor also handles null safely (falls back to bind-all), so no risk.AvroRpcHttpServerFactorySPI: The newdefaultmethod preserves backward compatibility for custom implementors. The Javadoc and upgrade guide both warn that the default ignores the host and binds to all interfaces — sufficient disclosure.JettyHttpServerFactory: Correctly overrides the new method and delegates toHttpServer(responder, host, port)— the constructor exists in avro-ipc-jetty 1.12.x (verified).AvroHttpConsumerHostTest: Pre-fix static trace confirms the test validates the fix: before the fix, the server bound to0.0.0.0, soconnect("127.0.0.2")would succeed andassertThrows(IOException.class, ...)would fail. After the fix it binds to127.0.0.1only and127.0.0.2is rejected.⚠️ Pre-fix validation: dynamic check skipped (Camel reactor build not feasible inline). Static trace confirms correct validation.@since 4.18.6: Correct for a backport targetingcamel-4.18.x.
No issues. LGTM.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Backport of #28360 to
camel-4.18.x, cherry-picking 55b266d and aa2c0c3.Makes the Avro HTTP consumer bind to the endpoint host. Preserves the 4.18 factory lookup, moves the upgrade note to the 4.18 guide, and adjusts
@sinceto 4.18.6.Validation:
git diff --checkpassed. Tests skipped as requested; full reactor sanity build stopped before completion.Generated by Codex via OSS Helper