camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lleclerc <llecl...@aim-rg.com>
Subject Dynamic endpoint using Recipient, ExchangeTimedOutException
Date Tue, 04 Dec 2012 16:21:59 GMT
Hi,

I got 2 separate projects, the project1 is an osgi component that start a
CamelContext with routes and use a dynamic recipientList(). On project2, I
call addRecipient(Endpoint endpoint) from project1's exported service.

In project1, my route is like this :
                from(sedaEndPointURI).delay(delayedData)
                        .process(new Processor() {
                            @Override
                            public void process(Exchange exchange) throws
Exception {
                                exchange.getOut().setBody("MYTEST");
                            }
                        })
                .recipientList(method(recipientListHolder,
RECIPIENT_METHOD_NAME));

And recipientList is like this :
    @RecipientList
    public Endpoint[] getRecipientList() {
        return recipientList.toArray(new Endpoint[0]);
    }

In project2, I am doing something like this : 
SedaEndpoint sedaEndpoint = new SedaEndpoint(sedaEndpointURI, new
SedaComponent(), new LinkedBlockingQueue<Exchange>());

sedaEndpoint.createConsumer(new Processor() {
            @Override
            public void process(Exchange exchange) throws Exception {
                System.out.println("Receiving stream2");
            }
        });

project1.addRecipient(sedaEndpoint);

I must be missing something here because I am getting this error :

2012-12-04 10:25:40,434 WARN  [SedaConsumer] Error processing exchange. 
Exchange[Message: MYTEST]. Caused by:
[org.apache.camel.ExchangeTimedOutException - 
The OUT message was not received within: 30000 millis. 
Exchange[Message: MYTEST]] org.apache.camel.ExchangeTimedOutException: 
The OUT message was not received within: 30000 millis. Exchange[Message:
MYTEST]

I tried recipient.setCamelContext(this); inside the addRecipientMethod on
project1 side without success..

What settings am I missing and how can I consume the messages from the
endpoint without affecting the route, only using the endpoint ? 

Thanks,




--
View this message in context: http://camel.465427.n5.nabble.com/Dynamic-endpoint-using-Recipient-ExchangeTimedOutException-tp5723624.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message