davsclaus commented on code in PR #27736:
URL: https://github.com/apache/camel/pull/27736#discussion_r4249475207
##########
dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/MetadataHelper.java:
##########
@@ -73,26 +70,32 @@
import org.apache.camel.support.PluginHelper;
import org.apache.camel.support.ResourceHelper;
import org.apache.camel.tooling.maven.MavenDownloaderImpl;
-import org.apache.camel.tooling.model.ComponentModel;
-import org.apache.camel.tooling.model.DataFormatModel;
-import org.apache.camel.tooling.model.LanguageModel;
import org.apache.camel.util.URISupport;
+/**
+ * Reads what the traits need to know of a route source: the endpoints its
routes consume from and send to. The service
+ * trait creates a Kubernetes Service when a route consumes from an http
component or knative, and the knative trait
+ * configures the knative: channels, endpoints and events.
+ * <p/>
+ * Java and XML routes are read into the route model without starting anything
(CAMEL-25592): Java with the Java DSL
+ * parser of camel-java-io, which neither compiles nor runs the source. YAML
routes, Pipes and Kamelets are loaded in a
+ * stubbed CamelContext, as the YAML DSL builds the uri of an endpoint written
with parameters with the component.
+ */
public class MetadataHelper {
public static final String STUB_PATTERN = "*";
- private static final Map<String, BiConsumer<CamelCatalog, SourceMetadata>>
COMPONENT_CUSTOMIZERS;
+ /** The steps that send to a fixed endpoint, which the routes create when
they start. */
+ private static final Set<String> PRODUCERS = Set.of("to", "wireTap");
+
Review Comment:
▎ Thanks, a note is useful, but the reason is a different one: RouteNodes
does emit ENDPOINT nodes for enrich, pollEnrich and poll with a constant uri.
They are left out because they (and toD) resolve their endpoint for each
exchange with a SendDynamicProcessor, so the stubbed CamelContext this replaces
never had them in getEndpoints() either. A static wireTap uses a SendProcessor,
which creates its endpoint when the route starts. Added that to the Javadoc in
31deda769b6a.
▎
▎ Claude Code on behalf of @davsclaus.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]