Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C230200BF4 for ; Fri, 6 Jan 2017 19:20:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7AD26160B48; Fri, 6 Jan 2017 18:20:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 02D63160B4C for ; Fri, 6 Jan 2017 19:20:43 +0100 (CET) Received: (qmail 38899 invoked by uid 500); 6 Jan 2017 18:20:42 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Delivered-To: moderator for users@activemq.apache.org Received: (qmail 48986 invoked by uid 99); 6 Jan 2017 16:17:14 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.286 X-Spam-Level: ** X-Spam-Status: No, score=2.286 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313, URI_TRY_3LD=0.001] autolearn=disabled Date: Fri, 6 Jan 2017 08:17:03 -0800 (PST) From: Steve To: users@activemq.apache.org Message-ID: <1483719423340-4720873.post@n4.nabble.com> Subject: seeking advice on efficient use of resources MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Fri, 06 Jan 2017 18:20:44 -0000 Hello, I am relatively new to ActiveMQ but have read a fair amount about it now. I still have questions however regarding how to efficiently use various resources: 1 - If one's application expects relatively light communication between it and the message broker, is it fine to use a single Connection for the entire application? At what point does communication load become heavy enough for multiple Connections to be warranted? Is there a rule of thumb on this or is it entirely a trial-and-error situation? 2 - Is it recommended to create a different Session object for each different MessageProducer and for each different MessageConsumer that the application uses? If not, what is the recommended pattern here? 3 - Is there a Thread that gets created each time a Session is created? If so, what is it used for exactly? 4 - How does one create a PooledSession? I assume that the advantage of using a PooledSession is that it avoids sending a notice to the broker when each time new Session is created, and avoids creating a new Thread over an over. Is this correct? 5 - How does one create a PooledProducer? I assume that the advantage of using a PooledProducer is that it avoids sending a notice to the broker each time a new MessageProducer is created. Is this correct? Thanks in advance, Steve -- View this message in context: http://activemq.2283324.n4.nabble.com/seeking-advice-on-efficient-use-of-resources-tp4720873.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.