Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 49871 invoked from network); 28 Jan 2009 20:21:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jan 2009 20:21:34 -0000 Received: (qmail 78717 invoked by uid 500); 28 Jan 2009 20:21:32 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 78697 invoked by uid 500); 28 Jan 2009 20:21:32 -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 Received: (qmail 78686 invoked by uid 99); 28 Jan 2009 20:21:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jan 2009 12:21:32 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jan 2009 20:21:24 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LSGuF-0000M6-Rd for users@activemq.apache.org; Wed, 28 Jan 2009 12:21:03 -0800 Message-ID: <21713809.post@talk.nabble.com> Date: Wed, 28 Jan 2009 12:21:03 -0800 (PST) From: darrickc To: users@activemq.apache.org Subject: Handling messages in the ActiveMQ thread best practices? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: darrickspam@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org I haven't been able to find anywhere the best practices for handling messages coming from ActiveMQ. When I receive a message via onMessage() I am in an ActiveMQ thread. Is it best to act on this message in non-ActiveMQ thread, or is it ok to do my work in the ActiveMQ thread? Will lengthy calculations slow ActiveMQ if they are performed in the ActiveMQ thread that an onMessage() gets called in? Currently I am doing both, for some things a spawn a worker thread to handle incoming messages, but sometimes I do quick things in the ActiveMQ thread. Thanks in advance! -- View this message in context: http://www.nabble.com/Handling-messages-in-the-ActiveMQ-thread-best-practices--tp21713809p21713809.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.