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 1FF5CECF1 for ; Mon, 14 Jan 2013 14:39:43 +0000 (UTC) Received: (qmail 50425 invoked by uid 500); 14 Jan 2013 14:39:42 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 49562 invoked by uid 500); 14 Jan 2013 14:39:39 -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 49543 invoked by uid 99); 14 Jan 2013 14:39:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 14:39:38 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tabish121@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qa0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 14:39:33 +0000 Received: by mail-qa0-f48.google.com with SMTP id l8so1492575qaq.0 for ; Mon, 14 Jan 2013 06:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version; bh=CjnEZcZkbPzK0/etmb6Vq0sx+qgNfSbvNhDx/shk1uA=; b=q7pLSGi17u5vPoBst7v4S3ire/0XINQS3K+uTpZ9X96UoFna7JR4mPfeYT2ZTv59kX jfXutQYRW7sRZQlC/XXN/tLFKfIYgxZhhCyZwLWJTnYPhKKZclkemkSSX6JGSelgp1/Y aLW0EWnDR7/JrFzpdKTs3obD+eKTQbUUOn81VAaA/9G1fsSN9DAhy83YNxGI/5DsdX4T NevJJCF1regijrGO7FwkIOdb6gaH+Wo9DWao5qyQ3GGd2nv+w5LMd/1C8QeXgkxtGs3X yL/pGNEjo+pZIFodOjq1+Z53mZgL05NLJXLdesieuhFZIRODnhGpfXU3lYWm/ufRujL+ 2pzQ== X-Received: by 10.224.185.141 with SMTP id co13mr70924530qab.33.1358174352237; Mon, 14 Jan 2013 06:39:12 -0800 (PST) Received: from [192.168.2.150] (c-98-231-181-148.hsd1.va.comcast.net. [98.231.181.148]) by mx.google.com with ESMTPS id f7sm9900881qap.13.2013.01.14.06.39.11 (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 06:39:11 -0800 (PST) Message-ID: <1358174350.3002.1.camel@OfficePC> Subject: Re: exception thrown on activemq server crash From: Timothy Bish To: users@activemq.apache.org Date: Mon, 14 Jan 2013 09:39:10 -0500 In-Reply-To: <1358173457627-4661708.post@n4.nabble.com> References: <1358173457627-4661708.post@n4.nabble.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 2013-01-14 at 06:24 -0800, jainmanglesh wrote: > Hi, > > I am sending 5000 messages (in loop, all in separate session) to activemq. > I have following entry in my activemq.xml file: > > > > > and I am sending messages using persistent delivery mode. > > My query is : I tried to stopped the activemq server during the sending > message. what kind of exception I would get. i could not see any exception > raised when I stopped the server instead the producer resumed sending > message when I re-started the activemq server. (I tried with delivery mode > as non_persistent as well). > > I need to throw exception, if in case of server crash to notify producer > that something went wrong (so producer can notify service about this and > hence service can rollback the transaction). > > I know if I use persistence delivery mode, I would not be loosing any > message and all message (in my case 5000 msgs) would be delivered to > queue(s) > what kind of setting I need to perform to make activemq server raising an > exception in case of server crash. > Sounds as though you are using the failover transport on your connection URI. This means the client will pause when the server goes down and resume sending as soon as it returns. You can remove 'failover:' from your URI to stop allowing the connection to automatically reconnect. > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/exception-thrown-on-activemq-server-crash-tp4661708.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.bish@redhat.com | www.fusesource.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/