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 61D94200D43 for ; Mon, 6 Nov 2017 12:07:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5ED8E1609E0; Mon, 6 Nov 2017 11:07:56 +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 88103160BEC for ; Mon, 6 Nov 2017 12:07:55 +0100 (CET) Received: (qmail 9921 invoked by uid 500); 6 Nov 2017 11:07:54 -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 9804 invoked by uid 99); 6 Nov 2017 11:07:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Nov 2017 11:07:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 58C84180812; Mon, 6 Nov 2017 11:07:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Ol4KfbNxDyTh; Mon, 6 Nov 2017 11:07:52 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DD8A75F2C5; Mon, 6 Nov 2017 11:07:51 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id p75so12935695wmg.3; Mon, 06 Nov 2017 03:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:reply-to:to:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=6k3LqkNjwsfpG+jhRHavbkAcYtvp+rBD+ob6OGqK8j4=; b=sCJeK4nqayrYoLTxhWhSIRDPoUyzxRwaiocvJ5XKnQvWUTS7ZcprK3fKAyQNBpVpMQ zQgful0v2aRwSeGFQZNQ7PkUvLHU6BR8RJotdn2CffX0J52r6ARtG4KrzNdBN6ACaSic UcDmhgABsTmQ6YPfL0CZ0QxuyKrDSiXXG5/1+pfwf2MopdlaNuoXAGovjvaIM/9F9saQ RZ1P6pDVoPZHHNIpnJeYEIzHqeuGzEO5znCf17HW2hmbm3L8og9o4nUpJVfGlGU7eAZg ESCW1xZ39OwUZ/oxGzIzN24PGFIzeb6BngXCK50DqFOOkLB/Oxa1fUihbraHae6iFIRz J3kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:date :in-reply-to:references:mime-version:content-transfer-encoding; bh=6k3LqkNjwsfpG+jhRHavbkAcYtvp+rBD+ob6OGqK8j4=; b=fHFimNyijYfsO0vFpgX5nteoNjdErwijPun116r8RA01leR2Gsg1lN4YGT81CSDR6Q qC99bvPDraANINEAE/LpMvBn5OYc79O/ymayHBeJx1atWJ6tmspSBHd61GkDhozkQYD1 C8uuzcjhM9BRavrjK2JK4PpsPAPUiEuucIM2o3IadimJYBvtZpQ9Zc0jx/Va6YKg+/fw KxGdWdAkVSxYjFtffsDmQ+q0waQg4C0lZncWR0HPV0E05SwEVaIpXWTm8lOObl8NPjaB QkDGD60MKHtzmRgG+a7SM1v7qiUP2+MMRc1o/iMs9IbPUaRgSFCQ4GkpGMp916kvqdNQ 4PKw== X-Gm-Message-State: AMCzsaUGi8liwYW7sHznilRUutcWCqQarnM8566zepD2bgRuUo6vO2n3 1QNmylsreinQARGbOUcTeQJmew== X-Google-Smtp-Source: ABhQp+RAtfXsBxizbqvy1FEbP5v/uTENPSO801x6eLoDl709YBvUn4K2Qt1V7cvWlIlIMtQFbRnzRg== X-Received: by 10.80.164.209 with SMTP id x17mr19879346edb.68.1509966469507; Mon, 06 Nov 2017 03:07:49 -0800 (PST) Received: from [10.241.36.57] ([199.253.246.1]) by smtp.googlemail.com with ESMTPSA id r1sm10209880edm.22.2017.11.06.03.07.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Nov 2017 03:07:48 -0800 (PST) Message-ID: <1509966467.2109.8.camel@gmail.com> Subject: Re: Accumulation of Links from global shared durable subscriptions (JMS 2.0) From: Lorenz Quack Reply-To: lquack@apache.org To: dev@qpid.apache.org, "users@qpid.apache.org" Date: Mon, 06 Nov 2017 11:07:47 +0000 In-Reply-To: References: <1509531393.1916.3.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit archived-at: Mon, 06 Nov 2017 11:07:56 -0000 On Mon, 2017-11-06 at 10:14 +0000, Robbie Gemmell wrote: > On 3 November 2017 at 16:58, Rob Godfrey wrote: > > > > On 1 November 2017 at 10:16, Lorenz Quack wrote: > > > > > > > > Hi, > > > > > > We noticed a potential problem with the way JMS 2.0 global shared > > > durable subscriptions are implemented in the JMS client.  The > > > implementation was designed, discussed, and implemented in QPIDJMS-220 > > > [1]. > > > > > > When a consumer of a subscription closes the underlying AMQP link is > > > not closed but merely detached since the closing of a subscription > > > link is used as the signal to unsubscribe the subscription.  These > > > subscription links remain on the broker until the subscription is > > > unsubscribed (detach with close=true) at which point the broker > > > discards all links associated with the subscription. > > > > > > For non-global subscriptions this does not seem to be a problem since > > > the clientId is used as the container-id and links are reused if > > > possible. > > > > > > For global subscription on the other hand the client uses a random > > > UUID associated with the connection as its own container-id.  This > > > means that on every new connection a new link is being estblished > > > rather than recovering an existing one.  Over time these subscription > > > links would accumulate on the broker until the subscription is > > > unsubscribed. > > > > > > Since shared durable subscriptions are expected to be long lived this > > > raises some concerns with regards to resource exhaustion on the > > > broker.  An application that would spin up a connection do some work > > > on a shared durable global subscription and then disconnect again > > > would be "leaking" links. > > > > > > Due to this concern we plan on disabling shared durable global > > > subscriptions for the initial v7 release of Qpid Broker-J.  There will > > > be a context variable to enable the feature. > > > > > > > > It seems to me a real shame that we are disabling this feature of JMS 2.0 > > because of the fact that from an AMQP point of view the link *may* be > > resumed, but in practice, with JMS, will never be.  Would it not be better > > to have a context variable which affects the behaviour of such links to > > shared durable subscriptions such that if the context variable returns > > "true" the links are removed from the link registry at the time of > > connection closure, and if the context value is false, then the current > > behaviour is maintained.  We could then later add functionality to the > > client to specify (via some flag) the behaviour it desires (thus ultimately > > removing the need for the context variable)? > > > > -- Rob > > > > > > > > > > > > > Thoughts, comments, discuss! > > > > > > Kind regards, > > > Lorenz > > > > > > > > > [1] https://issues.apache.org/jira/browse/QPIDJMS-220 > > > > I agree that disabling-by-default one of the more useful feature > additions seems a real shame. The timing was dissapointing also. > > The alternative idea for the context variable sounds good to me, as > does having the client flag its behaviour in some way. > > Robbie Thanks for all the feedback. We are looking into options to make this work without leaking Links. Depending on how impactful/intrusive the change would have to be we  might consider including this in v7.0.0 since Rob and Robbie seem to  feel quite strongly about this. Regarding the timing, we felt that shipping the broker with a known memory leak was undesirable and since this is not a regression but a new feature, disabling the new feature by default until a proper solution (with a potential change to QPIDJMS-220 and the client) could be devised seemed like a reasonable way forward.  I am sorry that you feel differently.  I hope we can come up with a solution  that is acceptable to everyone. Kind regards, Lorenz --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org