Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 45362 invoked from network); 5 Oct 2007 17:01:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 17:01:21 -0000 Received: (qmail 62913 invoked by uid 500); 5 Oct 2007 17:01:10 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 62868 invoked by uid 500); 5 Oct 2007 17:01:10 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 62859 invoked by uid 99); 5 Oct 2007 17:01:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 10:01:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [85.221.53.194] (HELO businesscape.no) (85.221.53.194) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 17:01:12 +0000 Received: from [192.168.1.45] ([85.221.53.194]) (authenticated user hegle@businesscape.no) by businesscape.no (Kerio MailServer 6.0.9) for camel-dev@activemq.apache.org; Fri, 5 Oct 2007 18:45:51 +0200 Message-ID: <47066DC2.90801@businesscape.no> Date: Fri, 05 Oct 2007 19:00:50 +0200 From: Ole Andreas Hegle User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: camel-dev@activemq.apache.org Subject: Improvement proposal for seda-endpoint Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi I got a problem with a seda-endpoint when I should send more than 1000 messages at a time. I suggest you create a property value for the maximum queue size (today this is 1000) public class SedaComponent extends DefaultComponent { public BlockingQueue createQueue() { return new LinkedBlockingQueue(1000); } You should also alter the process(Exchange) method in SedaEndpoint from queue.add(exchange.copy()); to something like this. public void process(Exchange exchange) { try{ if(queue.offer(exchange.copy(), 180, TimeUnit.SECONDS)) ; else System.out.println("Problem, did not find capasity in queue within 3 minutes"); }catch(Exception e){ System.out.println("Error processing exchange "+ e.toString()); } } This would make it much more reliable. Regards Ole Andreas Hegle Software developer at Businesscape AS