Claus Ibsen created CAMEL-27789:
-----------------------------------
Summary: camel-lumberjack: IPv6 host fails, an incomplete window
is never acknowledged, a frame before the window frame gives an NPE
Key: CAMEL-27789
URL: https://issues.apache.org/jira/browse/CAMEL-27789
Project: Camel
Issue Type: Bug
Components: camel-lumberjack
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-lumberjack for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. An IPv6 literal host fails
{{LumberjackComponent.createEndpoint}} splits host:port at the first ':'
({{indexOf}}), so {{lumberjack:[::1]:5044}} fails with a NumberFormatException.
Proposed change: split at {{lastIndexOf(':')}} and strip the brackets.
h4. 2. An incomplete window is never acknowledged
{{LumberjackFrameDecoder.handleWindowFrame}} emits the current window when a
new W frame arrives before the window is complete.
{{LumberjackMessageHandler.channelRead0}} counts down from the declared
{{window.getSize()}}, but fewer messages arrived, so the count never reaches 0
and no ACK is sent. The client times out and resends.
Proposed change: count down from the number of messages received and
acknowledge the last sequence number received.
h4. 3. A J or D frame before any W frame gives a NullPointerException
{{handleJsonFrame}} / {{handleDataFrame}} call {{window.addMessage}} with no
window; exceptionCaught logs a WARN with a stack trace and closes the
connection.
Proposed change: a clear protocol error.
h4. 4. Other
bridgeErrorHandler and exceptionHandler have no effect: the consumer never uses
the ExceptionHandler. SO_BACKLOG (100) and the 16 worker threads are hardcoded.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)