Serdar Gökay created CAMEL-25690:
------------------------------------

             Summary: camel-milo - a producer node ID with an unknown namespace 
URI fails the whole client connection
                 Key: CAMEL-25690
                 URL: https://issues.apache.org/jira/browse/CAMEL-25690
             Project: Camel
          Issue Type: Bug
          Components: camel-milo
    Affects Versions: 4.22.1, 4.18.5, 4.16.0
            Reporter: Serdar Gökay


Follow-up of CAMEL-25671 (consumer side, PR 
https://github.com/apache/camel/pull/27906), asked for in that review.

The producer operations of {{milo-client}} and {{milo-browse}} (write, method 
call, read, browse) resolve their node IDs with 
{{SubscriptionManager.Connected.lookupNamespace}}. A node ID whose namespace 
URI ({{nsu=}}) is not in the namespace table of the server makes 
{{NodeIds.toNodeId}} throw a {{NullPointerException}} 
({{requireNonNull(namespaceIndex)}}). The exceptional future reaches the 
{{handleAsync}} block of {{SubscriptionManager.write/call/readValues/browse}}, 
which calls {{handleConnectionFailure}}: the whole client connection is torn 
down and rebuilt, including the consumers that share it. {{write}} and {{call}} 
additionally swallow the error and complete with {{null}}, so the exchange does 
not see a failure.

Expected: the exchange fails (or receives a bad status code), the connection 
and the other users of it are not affected, as the consumer does since 
CAMEL-25671.

CAMEL-25671 left this out of scope on purpose. With the producer fixed, the 
consumer helper {{lookupMonitoredNode}} and {{lookupNamespace}} can share one 
lookup that handles an unknown namespace URI, as suggested in the review of PR 
27906.

I can send a PR.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to