You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/06/22 04:18:00 UTC

[jira] [Commented] (CAMEL-15222) Unable to call processor using .to("processorName") syntax

    [ https://issues.apache.org/jira/browse/CAMEL-15222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17141683#comment-17141683 ] 

Claus Ibsen commented on CAMEL-15222:
-------------------------------------

The docs was wrong and is being updated.

> Unable to call processor using .to("processorName") syntax
> ----------------------------------------------------------
>
>                 Key: CAMEL-15222
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15222
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Adam Campbell
>            Priority: Major
>         Attachments: ProcessorInvokeTest.txt
>
>
> According to the documentation, and also based on previous 2.x behavior it should be possible to call a processor bean using below syntax:
> {code:java}
> from("activemq:myQueue").to("myProcessor");
> {code}
> [https://camel.apache.org/manual/latest/processor.html]
> However based on attached unit test, it appears this syntax is no longer working with the 3.x code base. The problem appears to be in the AbstractCamelContext class where it is filtering the lookup to only Endpoint.class instances.
> {code:java}
> answer = getRegistry().lookupByNameAndType(uri, Endpoint.class);{code}
> [https://github.com/apache/camel/blob/camel-3.4.x/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java#L827]
> I'm wondering if Processor.class could be added as a secondary lookup or if there is another way the previously working syntax can be restored?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)