Skip to content

[camel-4.18.x] CAMEL-26108: Fix Avro HTTP consumer host binding - #28524

Merged
orpiske merged 3 commits into
apache:camel-4.18.xfrom
orpiske:backport/CAMEL-26108-to-camel-4.18.x
Oct 26, 2026
Merged

orpiske merged 3 commits into
apache:camel-4.18.xfrom
orpiske:backport/CAMEL-26108-to-camel-4.18.x

Conversation

@orpiske

@orpiske orpiske commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

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 @since to 4.18.6.

Validation: git diff --check passed. Tests skipped as requested; full reactor sanity build stopped before completion.

Generated by Codex via OSS Helper

orpiske and others added 2 commits October 26, 2026 14:36
…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)
@orpiske orpiske added the backport indicate that a Pull request is a backport from a fix from the main branch label Oct 26, 2026

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc Outdated

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 via parseURI from the endpoint URI — not nullable in normal operation. The avro-ipc-jetty HttpServer constructor also handles null safely (falls back to bind-all), so no risk.
  • AvroRpcHttpServerFactory SPI: The new default method 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 to HttpServer(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 to 0.0.0.0, so connect("127.0.0.2") would succeed and assertThrows(IOException.class, ...) would fail. After the fix it binds to 127.0.0.1 only and 127.0.0.2 is 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 targeting camel-4.18.x.

No issues. LGTM.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@orpiske
orpiske merged commit 04f5e3e into apache:camel-4.18.x Oct 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants