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

 Ramu kakarla commented on CAMEL-12022:
---------------------------------------

Hello Claus,

I do see 2 classes 
 1.DirectProducer.java (without timeout)
2.DirectBlockingProducer (with timeout)
 If no consumer is available  producer should wait till consumer avaialble 
(with some default time)
 If we implement this timeout in Directproducer. then there will be no diff b/w 
DirectProducer.java and DirectBlockingProducer
 instead we can use DirectBlockingProducer . 
 
{code:java}
public Producer createProducer() throws Exception {
        if (block) {
            return new DirectBlockingProducer(this);
        } else {
            return new DirectProducer(this);
        }
    }
{code}




> direct component - Let the producer able to block and wait for consumers to 
> be started
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12022
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12022
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>             Fix For: 2.21.0
>
>
> Similar to what direct-vm component can do. We should let the direct producer 
> detect that if there is no consumer yet, then it can wait until its ready 
> (with timeout) during starting routes. 
> This can avoid the slim chance during route startup that you get a 
> DirectConsumerNotAvailableException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to