I two beans named producer and consumer.  Producer starts a java.util.Timer
in its init method to pop every 100 ms and send a message to a SEDA queue
(using a ProducerTemplate it got from @EndpointInject).  Consumer has a
method to receive messages from the queue.  Here's the camel route:

        <camel:camelContext
                id="test">

                <camel:endpoint
                        id="sedaEndpoint"
                        uri="seda:test" />

                <camel:route>
                        <camel:from
                                uri="sedaEndpoint" />
                        <camel:to
                                uri="bean:consumer?methodName=processMessage" />
                </camel:route>

        </camel:camelContext>


I find sometimes just after Producer sends its first message, I get this
error logged.  This happens before Consumer has received any messages:

09:22:35,087 | ERROR | da:test thread:1 | DeadLetterChannel                |
rg.apache.camel.processor.Logger  203 | Failed delivery for exchangeId:
ID-swim4/48409-1241619754977/0-0. On delivery attempt: 0 caught:
java.lang.IllegalStateException: No producer, this processor has not been
started!
java.lang.IllegalStateException: No producer, this processor has not been
started!
        at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:78)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:185)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:132)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at 
org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:69)
        at java.lang.Thread.run(Thread.java:619)


This doesn't seem to cause anything bad to happen.  Even when this exception
happens, Consumer still receives all messages from Producer in order.

I'm just wondering why this happens.  Is there a race condition during
startup so that Producer can get its endpoint injected before camel is ready
to route messages to Consumer?  Should I be concerned about this?
-- 
View this message in context: 
http://www.nabble.com/SEDA-Component-Exception%3A-No-producer%2C-this-processor-has-not-been-started%21-tp23407604p23407604.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Reply via email to