Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 E32FA19666 for ; Mon, 4 Apr 2016 16:01:44 +0000 (UTC) Received: (qmail 81442 invoked by uid 500); 4 Apr 2016 16:01:44 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 81397 invoked by uid 500); 4 Apr 2016 16:01:44 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 81381 invoked by uid 99); 4 Apr 2016 16:01:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 16:01:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D1F2DC0222 for ; Mon, 4 Apr 2016 16:01:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.193 X-Spam-Level: *** X-Spam-Status: No, score=3.193 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313, URI_TRY_3LD=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tK5JeosAHsV2 for ; Mon, 4 Apr 2016 16:01:42 +0000 (UTC) Received: from mail-yw0-f180.google.com (mail-yw0-f180.google.com [209.85.161.180]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id A593B5F20E for ; Mon, 4 Apr 2016 16:01:41 +0000 (UTC) Received: by mail-yw0-f180.google.com with SMTP id g127so256990257ywf.2 for ; Mon, 04 Apr 2016 09:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=fn933LaWU1CscMtUiQzF4r0BTTfFmpuJD5QsvoBy9R4=; b=ndOEP90tJP8oHYZMVEL3PEWU0NBPC7y0fgNSXZ/DgIvJK3CWInHkRqDSXvlf5icD6L nwKKhtkEs4LhMrCl800CBE2Po8A8G3vILYYEMhMJg8n9eSTSPuwkNstdxRyjm1zjsupD MOGJQ7sbUVdo4ELQ/kY9cTrKrFvvETGkgsOztSHf4gzhcYjzy1zCCFxKg8jl+vesyDqV L3iTfxKnh2JdjwNgdsutx2HdYTHUldst5G8lqwQeLNxITakmb8hBFTgmKcVFoPS95DH4 iximA/QmJaszyFQgVgnig22oW3XOBA11Tl9pwan5JSg5ZkPgUF6qWSMe00YXoLFBeSsY mnPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=fn933LaWU1CscMtUiQzF4r0BTTfFmpuJD5QsvoBy9R4=; b=ercwBducl1XYFCmjJNi03FK/sVOU0BubsCdw/h5O2lO2lNzTwzHgDxwCIGwU/3MQjB lOlhBM2YZOX4C62s28YGPh7Z2smhjm9Re4Q6xVSsw0b0VHCP3v0n0nzy1fVY1FYVC/rS GMdXJ+0A8iAOsa2vw+CvA6eif4arFWA7ppj/c5RiXI/hACTBIg9UA9sB3ZsXfVuM8eLm VhKiJMMTDz8GbIZV6kWdNzXJYXVc9VNf16UmM+JceCQFfIqc92yS5ijqpM2ArVrtEjoG +MQr+DEegyxcGQYfiMuLhgYKo9Mzocb3/ecFMVz4wA3cTDdrRn9/NhDjGM6gRXl1+6yH gUTQ== X-Gm-Message-State: AD7BkJJ71F35X5Lw6blBdrwqokPIR/xzmo3gdZ+r1x46SJrKEZauQxyO2Ire0KOTCCafWGd6UpGp6NPZzgMJUg== X-Received: by 10.37.87.6 with SMTP id l6mr11723263ybb.160.1459785695256; Mon, 04 Apr 2016 09:01:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.65.17 with HTTP; Mon, 4 Apr 2016 09:01:05 -0700 (PDT) In-Reply-To: <1459783098898-4710264.post@n4.nabble.com> References: <1459783098898-4710264.post@n4.nabble.com> From: Christopher Shannon Date: Mon, 4 Apr 2016 12:01:05 -0400 Message-ID: Subject: Re: Force Producer to fail when blocked by slow consumer? To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001a114718c6d06b09052faad7ba --001a114718c6d06b09052faad7ba Content-Type: text/plain; charset=UTF-8 There are a couple options you can configure. Take a look at this page http://activemq.apache.org/producer-flow-control.html Look at the sendFailIfNoSpace and sendFailIfNoSpaceAfterTimeout options. These will allow the producer to fail immediately or after a set amount o time instead of waiting indefinitely. On Mon, Apr 4, 2016 at 11:18 AM, Paulon wrote: > Hey, > > we have a setup whereby we are sending persistent messages to an MQ in > SessionTransacted batches. > > The problem we are facing is that if the MQ fills up, our producer blocks > indefinitely. > > We dont have control over the server side queue, so we need to be able to > abort sending (rather than wait forever) > > We have set the sendTimeout on the connectionFactory however, while this > throws the expected exception, any attempt to do a session.close() blocks > waiting for a Response object. > > Is there a way to get the blocked send call to just fail/timeout to enable > us to close the session/connection object and terminate the thread/process? > > Otherwise we are at the mercy of a slow/poorly configured consumer that can > block our system. > > Cheers! > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Force-Producer-to-fail-when-blocked-by-slow-consumer-tp4710264.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > --001a114718c6d06b09052faad7ba--