Hi

This should be fixed in Camel 2.3.



On Wed, Mar 31, 2010 at 9:46 AM, _Jens <jens.riemschnei...@icw.de> wrote:
>
> Hi,
>
> I have run into an issue with a .recipientList() using Mina endpoints (Camel
> 2.1). Basically, I was changing a route from using static .to() calls into a
> more dynamic .recipientList() call. With the .to() calls IoSessions were
> reused to send data. However, with the .recipientList() it seems that the
> IoSessions are created for each message. They are not closed immediately
> after sending the message, but are held for quite some time. In the end our
> server side refused additional connections until a timeout occurred and the
> sessions were closed.
>
> The reason for this seems to be the way that the recipient list retrieves
> producers from the producer cache. From the source code of
> RecipientList.java:
>
>        while (iter.hasNext()) {
>            Object recipient = iter.next();
>            Endpoint endpoint = resolveEndpoint(exchange, recipient);
>            Producer producer =
> getProducerCache(exchange).getProducer(endpoint);
>            processors.add(producer);
>        }
>
> There is a comment in ProducerCache.getProducer that says the producer pool
> is not used because it cannot be guaranteed that the producer is returned to
> the pool.
> I changed our implementation back to using .choice() and .to() calls. But it
> would be nice to have the recipient list functionality with Mina endpoints.
>
> Thanks,
> Jens
> --
> View this message in context: 
> http://old.nabble.com/No-connection-reuse-with-recipientList-and-Mina-Endpoints-tp28092450p28092450.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to