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 25AE110A17 for ; Mon, 7 Apr 2014 13:58:24 +0000 (UTC) Received: (qmail 62218 invoked by uid 500); 7 Apr 2014 13:58:22 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 61892 invoked by uid 500); 7 Apr 2014 13:58:17 -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 61773 invoked by uid 99); 7 Apr 2014 13:58:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 13:58:12 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.213.170 as permitted sender) Received: from [209.85.213.170] (HELO mail-ig0-f170.google.com) (209.85.213.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 13:58:08 +0000 Received: by mail-ig0-f170.google.com with SMTP id uq10so4485672igb.1 for ; Mon, 07 Apr 2014 06:57:48 -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=yH/04Fhl/G2J+jEW94KLrev5fvE2R+ExFMtmSHKz4Ao=; b=araQYBgdIDuqui9xqROReHziVK5Op2x2yWiy9k6cqbP+P7COTW0KISfCL4Q5iG6KiJ wR8z0ppVfZ2FPmw88o4T3uPzc+LQ+M4TQtCMEbY4011CI9HXpmksLX+IThwKQLsTts8y LdToEKdwIIo4D1tfiBa19TXZWil2cyO/GoZqMEQvTfLGRAzka6LJ/G8hFXnYcoRc+UZm BKLspIZ6vIOW0IahluHgo6w+ltnuC9/wDCdM5WMqS+AzoKuxhBNZoIvgq37dQoahgr1R 5en6y+8gbok2DKO6nhfHc7S1ZbpOgpT/9a5BBU30F/kE9N5k/ZcZxb1eBQef1O1aP5gG qNGw== MIME-Version: 1.0 X-Received: by 10.50.79.195 with SMTP id l3mr20604511igx.36.1396879067890; Mon, 07 Apr 2014 06:57:47 -0700 (PDT) Received: by 10.64.225.205 with HTTP; Mon, 7 Apr 2014 06:57:47 -0700 (PDT) In-Reply-To: <1396872208187-4680119.post@n4.nabble.com> References: <1396872208187-4680119.post@n4.nabble.com> Date: Mon, 7 Apr 2014 14:57:47 +0100 Message-ID: Subject: Re: Broken transaction when using async send From: Gary Tully To: "users@activemq.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org there is a related discussion here: https://issues.apache.org/jira/browse/AMQ-3166 my thinking is that a failure to send async should mark the transaction rollbackOnly so that the commit will always fail in that event. So you send async in the hope that all is well and the transaction boundary gives you feedback. If you need more immediate feedback they a sync Send is needed. alwaysSyncSend option on the CF On 7 April 2014 13:03, ld4711 wrote: > In our producer we use JMS transactions to send batches of 1,000 messages to > the queue. However, we faced lost messages without client notification in > case of server memory limit constraints (producer flow control). The point > is that the transactions all committed without exceptions, but messages that > were sent after the point where the server could not store further messages > got lost without notice. > > Analyzing the issue showed that we were not aware of the default > asynchronous send mode. In consequence we did not have set an exception > listener on the connection factory. But even after remedying that we found > the following situation: > 1. Set the broker memory limit to a very small value (1 MB). > 2. Send 100 messages via producer. > With that test setup the broker can handle 95 messages. However, due to the > asynchronous callback the producer is able to commit the transaction BEFORE > the callback is triggered by the server. > In consequence it seems that asynchronous sending breaks transactions in > ActiveMQ and should not be the default mode of processing. Am I missing > something? > > Thanks, > Lars > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Broken-transaction-when-using-async-send-tp4680119.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://redhat.com http://blog.garytully.com