On Thu, Nov 29, 2012 at 5:46 PM, Sébastien Foubert <[email protected]> wrote: > Hi, > > I use a timer based pooling consumer like this, > http://camel.apache.org/polling-consumer.html#PollingConsumer-Timerbasedpollingconsumer > > The difference is that to consume messages, i use a jms selector like this > * String message = > consumer.receiveBody("activemq:com.xxx.esb.myqueue?selector=JMSTimestamp<" > + (System.currentTimeMillis() - this.delay), this.wait, > String.class);* > > But, it will create a lot of active openwire connections on queue, that > will be never closed > i tried a consumerTemplate.close() but it does'nt nothing. > When no selector is specified, only one active consumer is present. > > i use servicemix 4.4 with camel 2.8 and activemq. > > Have you a idea, how to close this connections ? >
Try without the consumer template, and invoke close on the consumer yourself. Lookup the endpoint from the camel context. Create a PollingConsumer from the endpoint start the consumer receive what you need close the consumer > Thanks, > > Sébastien F. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
