Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 22788 invoked from network); 12 Apr 2011 12:07:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 12:07:27 -0000 Received: (qmail 73515 invoked by uid 500); 12 Apr 2011 12:07:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 73479 invoked by uid 500); 12 Apr 2011 12:07:26 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 73471 invoked by uid 99); 12 Apr 2011 12:07:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 12:07:26 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of akarpe@fusesource.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 12:07:20 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q9cN1-000541-6i for users@camel.apache.org; Tue, 12 Apr 2011 05:06:59 -0700 Date: Tue, 12 Apr 2011 05:06:59 -0700 (PDT) From: Ashwin Karpe To: users@camel.apache.org Message-ID: <1302610019202-4298040.post@n5.nabble.com> In-Reply-To: <1302603452703-4297889.post@n5.nabble.com> References: <1302603452703-4297889.post@n5.nabble.com> Subject: Re: Multiple message producers and consumers per ActiveMQ session MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, The short answer is yes. It is thread safe. As for performant, it is more nuanced. If you have multitple threads reusing the same session/connection, you could get contention for the connection object. For performance, you may be better off using a PooledConnectionFactory. I would also advise that you set the consumer.prefetchSize on the Connection object to 1 in order to not lock up a lot of memory in the connection objects. This is very do-able in Camel by setting up the right kind of ConnectionFactory for the JMS or ActiveMQ component. Hope this helps. Cheers, Ashwin... ----- --------------------------------------------------------- Ashwin Karpe Apache Camel Committer & Sr Principal Consultant FUSESource (a Progress Software Corporation subsidiary) http://fusesource.com Blog: http://opensourceknowledge.blogspot.com CamelOne 2011: http://fusesource.com/camel2011 --------------------------------------------------------- -- View this message in context: http://camel.465427.n5.nabble.com/Multiple-message-producers-and-consumers-per-ActiveMQ-session-tp4297889p4298040.html Sent from the Camel - Users mailing list archive at Nabble.com.