Claus Ibsen created CAMEL-26121:
-----------------------------------

             Summary: camel-flink - the component dataStream and 
dataStreamCallback options are ignored, and a DataStream callback always fails 
with the default collect=true
                 Key: CAMEL-26121
                 URL: https://issues.apache.org/jira/browse/CAMEL-26121
             Project: Camel
          Issue Type: Bug
          Components: camel-flink
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of flink, spring-batch and 
optaplanner (CAMEL-24961, PR #28418).

h4. 1. The component-level dataStream and dataStreamCallback options are ignored

{{FlinkEndpoint.doInit}} (main 2a465aa4814c, lines 74-84) falls back to the 
component's {{dataSet}} and {{dataSetCallback}}, but not to its {{dataStream}} 
and {{dataStreamCallback}}. With those set only on the component, 
{{flink:datastream}} fails "No DataStream defined" 
({{DataStreamFlinkProducer}}, line 95). Checked on 4.24.0-SNAPSHOT with a local 
Flink environment.

Proposed: also fall back to the component's {{dataStream}} and 
{{dataStreamCallback}} in {{doInit}}.

h4. 2. A DataStream callback always fails with the default collect=true

{{collect}} defaults to {{true}} ({{FlinkEndpoint}}, main 2a465aa4814c, line 
50), and {{DataStreamFlinkProducer.collectResults}} (line 79) throws "collect 
mode not supported for Flink DataStreams." when the callback returns a 
DataStream. So a DataStream callback returning a DataStream fails until 
{{collect=false}} is set. Checked on 4.24.0-SNAPSHOT with a local Flink 
environment.

Proposed: for {{flink:datastream}} return the DataStream as is when {{collect}} 
was not set explicitly (or default collect to false there).

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to