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 8FF5B200B7A for ; Mon, 5 Sep 2016 15:50:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8E848160ACB; Mon, 5 Sep 2016 13:50:51 +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 D5CC9160ABC for ; Mon, 5 Sep 2016 15:50:50 +0200 (CEST) Received: (qmail 43923 invoked by uid 500); 5 Sep 2016 13:50:50 -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 43912 invoked by uid 99); 5 Sep 2016 13:50:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2016 13:50:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6A47EDFDD3; Mon, 5 Sep 2016 13:50:49 +0000 (UTC) From: mtaylor To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an... Content-Type: text/plain Message-Id: <20160905135049.6A47EDFDD3@git1-us-west.apache.org> Date: Mon, 5 Sep 2016 13:50:49 +0000 (UTC) archived-at: Mon, 05 Sep 2016 13:50:51 -0000 Github user mtaylor commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/749#discussion_r77524869 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java --- @@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr @Override public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception { + + // If the protocol doesn't support flow control, we have no choice other than fail the communication + if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) { + ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit(); + this.getRemotingConnection().fail(exception); + throw exception; --- End diff -- What do you mean by silently fail? If the client chooses an appropriate QoS level (or protocol equivilent) it'll never get an ack and thus as far as the client is concerned the broker never received it. On Mon, Sep 5, 2016 at 2:49 PM, clebertsuconic wrote: > In artemis-server/src/main/java/org/apache/activemq/artemis/ > core/server/impl/ServerSessionImpl.java > > : > > > @@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr > > > > @Override > > public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception { > > + > > + // If the protocol doesn't support flow control, we have no choice other than fail the communication > > + if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) { > > + ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit(); > > + this.getRemotingConnection().fail(exception); > > + throw exception; > > there is no way to tell the producers on these protocols that the message > failed. Keep coming would endup on a drop and the producer may thing it was > sent ok. It would be a message loss without communicating the failure to > the producer. > > Is it possible to configure it to go from PAGING to DROP once the disk > limit is reached? > > you can already configure global-max-size to DROP. > > I *strongly* advise against silently fail. (I have a strong opinion on > this subject). I won't silently fail a message send on purpose here. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . > --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---