Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 98046 invoked from network); 30 Mar 2009 17:47:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2009 17:47:58 -0000 Received: (qmail 2169 invoked by uid 500); 30 Mar 2009 17:47:58 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 2090 invoked by uid 500); 30 Mar 2009 17:47:57 -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 2080 invoked by uid 99); 30 Mar 2009 17:47:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 17:47:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2009 17:47:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B3815234C044 for ; Mon, 30 Mar 2009 10:47:34 -0700 (PDT) Message-ID: <2079611242.1238435254732.JavaMail.jira@brutus> Date: Mon, 30 Mar 2009 10:47:34 -0700 (PDT) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQNET-154) Closing a consumer does not unblock receive call In-Reply-To: <404648515.1238403462871.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQNET-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish updated AMQNET-154: -------------------------------- Fix Version/s: 1.1 > Closing a consumer does not unblock receive call > ------------------------------------------------ > > Key: AMQNET-154 > URL: https://issues.apache.org/activemq/browse/AMQNET-154 > Project: ActiveMQ .Net > Issue Type: Bug > Components: ActiveMQ Client > Affects Versions: 1.1 > Environment: windows xp profesional > Reporter: Marco Crivellaro > Assignee: Jim Gomes > Fix For: 1.1 > > > calling the close method of a cosumer while this has a pending receive call blocked does not unblock returning null. > sample code (C#) > using System; > using Apache.NMS; > using Apache.NMS.ActiveMQ; > using System.Threading; > namespace simpleConsumer > { > class Program > { > private static bool _exit = false; > private static IMessageConsumer _consumer; > > static void Main(string[] args) > { > Apache.NMS.ActiveMQ.ConnectionFactory connectionFactory = new ConnectionFactory("tcp://172.18.141.102:61616"); > Apache.NMS.IConnection connection = connectionFactory.CreateConnection(); > connection.Start(); > Apache.NMS.ISession session = connection.CreateSession(); > Apache.NMS.ActiveMQ.Commands.ActiveMQTopic inputTopic = new Apache.NMS.ActiveMQ.Commands.ActiveMQTopic("test.topic"); > _consumer = session.CreateConsumer(inputTopic, "2>1"); > Thread _receiveThread = new Thread(_receiveLoop); > _receiveThread.Start(); > while (!_exit) > { > String command = Console.ReadLine(); > if (command == "exit") > { > _exit = true; > } > } > _consumer.Close(); > _receiveThread.Join(); > } > private static void _receiveLoop() > { > while (!_exit) > { > Apache.NMS.ActiveMQ.Commands.ActiveMQTextMessage message = (Apache.NMS.ActiveMQ.Commands.ActiveMQTextMessage)_consumer.Receive(); > Console.WriteLine(message.Content.ToString() + " [looping...]"); > } > } > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.