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 (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/02 10:59:53 UTC

[jira] [Resolved] (CAMEL-4969) Processor is not started when passed into Endpoint.createConsumer()

     [ https://issues.apache.org/jira/browse/CAMEL-4969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4969.
--------------------------------

       Resolution: Not A Problem
    Fix Version/s: 2.10.0
         Assignee: Claus Ibsen

This is by design. Camel handles the lifecycle of the routes, and its services such as processors.

The createConsumer should *only* create the consumer, *not* process exchanges in the create method.
                
> Processor is not started when passed into Endpoint.createConsumer()
> -------------------------------------------------------------------
>
>                 Key: CAMEL-4969
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4969
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Sergey Zolotaryov
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.10.0
>
>         Attachments: camel-issue.zip
>
>
> We have been retrieving configuration parameters from Processor's that are passed to Endpoint.createConsumer in order to properly initialize the Consumer being created. To ask for the parameters we send a message to the Processor. It used to work in Camel 2.5 now we are in the migration process and we have found that the Processor passed is not started, which results in IllegalStateException. A workaround is explicit initialization of the Processor before sending anything:
> {code}
> if (processor instanceof StatefulService) 
> {
>  final StatefulService service = (StatefulService) processor; 
>  if (!service.isStarted()) { service.start(); }
> }
> {code}
> I am attaching the sample project which illustrates the behaviour.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira