Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 35527 invoked from network); 18 Mar 2007 11:44:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2007 11:44:57 -0000 Received: (qmail 54590 invoked by uid 500); 18 Mar 2007 11:45:05 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 54565 invoked by uid 500); 18 Mar 2007 11:45:05 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 54552 invoked by uid 99); 18 Mar 2007 11:45:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2007 04:45:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2007 04:44:56 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 39B7071406D for ; Sun, 18 Mar 2007 04:44:36 -0700 (PDT) Message-ID: <25294575.1174218276233.JavaMail.jira@brutus> Date: Sun, 18 Mar 2007 04:44:36 -0700 (PDT) From: "Nathan Mittler (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQCPP-90) Openwire Session doesn't run its MessageListeners from a single thread In-Reply-To: <17170426.1174040854643.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Mittler resolved AMQCPP-90. ---------------------------------- Resolution: Fixed Fixed in trunk. I ran with the sample application and verfied that messages are always received in the same thread. > Openwire Session doesn't run its MessageListeners from a single thread > ---------------------------------------------------------------------- > > Key: AMQCPP-90 > URL: https://issues.apache.org/activemq/browse/AMQCPP-90 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: Openwire > Affects Versions: 2.0 > Reporter: Albert Strasheim > Assigned To: Nathan Mittler > Fix For: 2.0 > > Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java > > > According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code: > For this reason, JMS does not cause concurrent execution of client code unless > a client explicitly requests it. One way this is done is to define that a session > serializes all asynchronous delivery of messages. > To receive messages asynchronously, a client registers an object that > implements the JMS MessageListener interface with a MessageConsumer. In effect, > a Session uses a single thread to run all its MessageListeners. While the thread is > busy executing one listener, all other messages to be asynchronously delivered > to the session must wait. > In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval. > This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.