Bluelock / camel-spring-amqp

Spring AMQP Component for Apache Camel
61 stars 54 forks source link

template.getCamelContext() adds new endpoint everytime #54

Open psusarla opened 10 years ago

psusarla commented 10 years ago

Hi,

I am noticing this behavior:

Whenever my application executes this line, a new spring-amqp endpoint gets added:

@Autowired ProducerTemplate template;

//My code template.getCamelContext(); <-- This line in specific //Do other stuff

deckerego commented 10 years ago

Is this a bad thing?

psusarla commented 10 years ago

Hi John,

Thanks for your response. The concern I have is: this line is executed every 5 mins as part of health check. This can potentially cause out of memory exception. I have a temporary work around for this issue though. Any idea why endpoint is getting added?

Thanks again, Phani

Sent from my iPad

On May 18, 2014, at 10:24 PM, John Ellis notifications@github.com wrote:

Is this a bad thing?

— Reply to this email directly or view it on GitHub.

deckerego commented 10 years ago

Without seeing more of the code, I'm guessing all of your endpoints would be added when re-fetching the Camel context. Are you sure this only happens with AMQP endpoints?