Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 358D8178E9 for ; Thu, 11 Jun 2015 12:25:10 +0000 (UTC) Received: (qmail 97690 invoked by uid 500); 11 Jun 2015 12:25:10 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 97658 invoked by uid 500); 11 Jun 2015 12:25:10 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 97646 invoked by uid 99); 11 Jun 2015 12:25:09 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 12:25:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4D9E91A542F for ; Thu, 11 Jun 2015 12:25:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.68 X-Spam-Level: * X-Spam-Status: No, score=1.68 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TwiY1iHlb1-C for ; Thu, 11 Jun 2015 12:25:03 +0000 (UTC) Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 0E8EE20FF7 for ; Thu, 11 Jun 2015 12:25:03 +0000 (UTC) Received: by qkhg32 with SMTP id g32so2284468qkh.0 for ; Thu, 11 Jun 2015 05:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1aEkJgvHoCJl3MRRTLPVFvm6PyJLdn4P/GusDwCyVU8=; b=D2ZEWWYzdlRK7cTtIeykH8Ib07U9o4ow7OKjqYaUVyOmgUqyYomgNY1L2ZNd2Vgwcg Fz5qSd8IrdBHEla3lJUa3qXCjeyrLjYxwUCFD3aIPxNLhBoiSXttXMzwuXqxlsAc51j0 zsRPtv/ihXW5E9jlokRhQ8RkrHOaHUSdYCCFJ4+3ZpNVaGwCtKi2kujC/GeBmHACygzI 6RFe2RsIlA2+eRsXIu997HQ081NdMQK4Kyt1AlZC90uaGoCSHQFqAV2ioTuesFE5FC8f gWkE4Hq6nScih5RneMpmkuVRGzeHYEyXVrw4iFFCo6I8WivP8V62o2DSZgNGB7oRlIL1 iR+Q== MIME-Version: 1.0 X-Received: by 10.55.20.136 with SMTP id 8mr18255580qku.8.1434025502071; Thu, 11 Jun 2015 05:25:02 -0700 (PDT) Received: by 10.140.29.133 with HTTP; Thu, 11 Jun 2015 05:25:02 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Jun 2015 14:25:02 +0200 Message-ID: Subject: Re: How to shutdown ack-flusher thread on Java client? From: Rob Godfrey To: "users@qpid.apache.org" Content-Type: text/plain; charset=UTF-8 I've raised a JIRA and made a fix against the AMQP 0-8/9/9-1/10 client which gets rid of the ack flusher timer: https://issues.apache.org/jira/browse/QPID-6583 -- Rob On 11 June 2015 at 11:15, Tomohisa Igarashi wrote: > Hi Rob, > > Thank you for the immediate and clear response! > > I agree it doesn't cause a functional problem, just a cleanup issue on > client shutdown. > I just found qpid-jms-client and it looks like a successor of the one > in qpid-client. Are you OK with filing a JIRA for this issue on > QPIDJMS? > (I also tried with qpid-jms-client 0.2.0 and same result) > > Thanks, > Tomo > > > -- > IGARASHI Tomohisa mailto:tm.igarashi@gmail.com > > > On Thu, Jun 11, 2015 at 4:48 PM, Rob Godfrey wrote: >> Hi Tomo, >> >> looking at the code (AMQSession_0_10.java), it seems that the >> ack-flusher is created here (line 75): >> >> private static Timer timer = new Timer("ack-flusher", true); >> >> That is a single (java.util.)Timer is shared across all sessions on >> *all* connections - the timer is not connection specific. Since it is >> shared by all connections, it is not cancel()led when a connection is >> close()ed. The Timer is created with isDaemon being true, so the fact >> that the thread is never stopped wouldn't normally be an issue. >> >> It would need a code change on our side to change this behaviour. >> >> -- Rob >> >> On 11 June 2015 at 09:30, Tomohisa Igarashi wrote: >>> Hi, >>> >>> When I run Qpid Java client from exec-maven-plugin, I get this warning >>> complaining about remaining ack-flusher thread: >>> >>> =================== >>> [WARNING] thread >>> Thread[ack-flusher,5,org.switchyard.quickstarts.camel.amqp.binding.QpidClient] >>> was interrupted but is still alive after waiting at least 15000msecs >>> [WARNING] thread >>> Thread[ack-flusher,5,org.switchyard.quickstarts.camel.amqp.binding.QpidClient] >>> will linger despite being asked to die via interruption >>> [WARNING] NOTE: 1 thread(s) did not finish despite being asked to via >>> interruption. This is not a problem with exec:java, it is a problem >>> with the running code. Although not serious, it should be remedied. >>> [WARNING] Couldn't destroy threadgroup >>> org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=org.switchyard.quickstarts.camel.amqp.binding.QpidClient,maxpri=10] >>> java.lang.IllegalThreadStateException >>> =================== >>> >>> So ack-flusher thread is not stopped even after connection is closed. >>> Is there a way to stop it safely? >>> >>> Whole client code is here: >>> https://github.com/igarashitm/switchyard/blob/master/quickstarts/camel-amqp-binding/src/test/java/org/switchyard/quickstarts/camel/amqp/binding/QpidClient.java >>> >>> I tried adding connection.close() on this code with qpid-client 0.32, >>> but I got same warning. >>> >>> Thanks, >>> Tomo >>> >>> -- >>> IGARASHI Tomohisa mailto:tm.igarashi@gmail.com >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org >>> For additional commands, e-mail: users-help@qpid.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org >> For additional commands, e-mail: users-help@qpid.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > For additional commands, e-mail: users-help@qpid.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org