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 2019/06/06 15:47:00 UTC

[jira] [Commented] (CAMEL-13515) Allow producer to lazy start until first message

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

Claus Ibsen commented on CAMEL-13515:
-------------------------------------

Okay looking into use an EndpointStrategy to wrap the endpoint if the producer would be configured as lazy. Then we have a hook to be able to wrap when the producer is created, and can control the lifecycle to only start on first message.

> Allow producer to lazy start until first message
> ------------------------------------------------
>
>                 Key: CAMEL-13515
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13515
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>
> We could add option to DefaultProducer so any producer allows to defer its startup (doStart) to when the first message is being processed. The danger is that the startup logic has to be thread-safe and if there are concurrent messages then they would need to hold back until the startup is done. This is a trade-off that the user would need to accept if enabled.
> But this can make it easier to let Camel startup routes even if some remote server is not available when a producer startup as part of route startup.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)