Return-Path: Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: (qmail 86240 invoked from network); 10 Nov 2008 16:47:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Nov 2008 16:47:01 -0000 Received: (qmail 40889 invoked by uid 500); 10 Nov 2008 16:47:09 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 40718 invoked by uid 500); 10 Nov 2008 16:47:08 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 40707 invoked by uid 99); 10 Nov 2008 16:47:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Nov 2008 08:47:08 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 10 Nov 2008 16:45:48 +0000 Received: (qmail 14842 invoked from network); 10 Nov 2008 16:46:29 -0000 Received: from 124.43.208.136 (HELO ?10.0.0.5?) (124.43.208.136) by relay01.pair.com with SMTP; 10 Nov 2008 16:46:29 -0000 X-pair-Authenticated: 124.43.208.136 Message-ID: <49186564.50803@apache.org> Date: Mon, 10 Nov 2008 22:16:28 +0530 From: "Asankha C. Perera" User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: dev@synapse.apache.org Subject: Re: [SUGGESTION] New Sample References: <490EA902.6040808@wso2.com> <4913A5F5.8040401@opensource.lk> <88f5d710811100341m3aeaaa25o47cde4d961a8ba25@mail.gmail.com> <88f5d710811100531p19f17f58m9a0fe5fc0e1fe932@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > In a polling model there are again two options: > > 1. One thread is responsible for the polling (i.e. executing > MessageConsumer#receive in a loop) and hands the received messages > over to a worker pool. > 2. Several threads execute MessageConsumer#receive (requires several > sessions) and messages are processed by the receiving thread. > > Option 1 is quite easy to implement in the current JMS transport, but > we would run into the same problem again. Option 2 easily solves the > problem but requires some substantial changes. I have implemented option #2 you state above.. also with thread pools that dynamically scale to handle increased loads and shrink when the load reduces. It also now supports both local and JTA transactions.. I will commit the code I have now, and implement the enhancements planned for asynchronous receipt of responses separately.. asankha -- Asankha C. Perera http://adroitlogic.org http://esbmagic.blogspot.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org For additional commands, e-mail: dev-help@synapse.apache.org