Thank you Claus,

I'm doing some tests but what you said has to be the problem. I have routes
that many times per day use the consumerTemplate for reading files (each
file = one endpoint), so these endpoints must have been updating the
endpoint cache periodically. 

I fear that in this case increasing the cache won´t help me because sooner
or later I will fill it. 

I guess that if I want to look for an endpoint without using the endpoint
cache, I have to use the registry, haven´t I?

The Jira ticket about keeping the route endpoints in the cache would be very
useful.

Thanks in advance,

  Aida.

Claus Ibsen-2 wrote
> Hi
*
> Maybe you hit the upper limit on the endpoint cache
*
> .
> 
> You can set a higher endpoint cache size
> http://camel.apache.org/how-do-i-configure-the-maximum-endpoint-cache-size-for-camelcontext.html
> 
> Though we should likely improve Camel to keep the endpoints from the
> routes in the cache as they are in use or potential in use if a route
> has been stopped.
> 
> I have logged a ticket
> https://issues.apache.org/jira/browse/CAMEL-7965
> 
> On Wed, Oct 22, 2014 at 5:45 PM, Aida <

> ai.desu@

> > wrote:
>> Hello,
>>
>> I'm working with Camel 2.12.3
>>
>> I have three routebuilders that consist of consuming messages from a seda
>> queue and sending them to a destination endpoint, like this:
>>
>> from("seda:syncronizedMyQueue")
>>  .to("myDestinationEndpoint");
>>
>>
>> When a message must be sent to one of these queues, I use the
>> camelContext.hasEndpoint() method (to verify that we are going to send a
>> message to an endpoint that exists, because I create these routebuilders
>> dynamically).
*
>  The problem is that when a message is sent to one of these
>> queues that haven´t been used for a while, a null is retrieved (the API
>> says
>> that if the endpoint does not exist, null is returned). Nevertheless,
>> using
>> the JConsole I can see that the endpoint associated to that queue do
>> exist.
*
>>
>> Example:
>> I have the queues MyQueue1 and MyQueue2 (different routebuilders)
>>
>> RouteBuilder1:
>>         from("seda:syncronizedMyQueue1")
>>          .to("myDestinationEndpoint1");
>>
>> RouteBuilder2:
>>         from("seda:syncronizedMyQueue2")
>>          .to("myDestinationEndpoint2");
>>
>> If, after camel context is up and both routebuilders are available, I
>> start
>> sending messages to MyQueue1, no problem arises.
>>
>> If after a while without sending a message (days or weeks) to MyQueue2 I
>> start sending messages to it, the method camelContext.hasEndpoint()
>> returns
>> null.
>>
>> In both cases I can see the endpoints of both queues available using the
>> JConsole. Both queues are active and have, apparently, the same values in
>> each attribute.
>>
>> I wanted to ask if there is any known issue (or expected behaviour) that
>> can
>> cause that a seda queue endpoint that is not used for a while (days or
>> even
>> weeks) stops being recognised by the camel context)
>>
>> Thanks in advance.
>>
>> QR.
>>
>>   Aida.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/camelContext-hasEndpoint-returns-null-when-endpoint-apparently-exists-tp5757907.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: 

> cibsen@

> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/





--
View this message in context: 
http://camel.465427.n5.nabble.com/camelContext-hasEndpoint-returns-null-when-endpoint-apparently-exists-tp5757907p5758078.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to