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 D33F47535 for ; Thu, 1 Dec 2011 18:42:24 +0000 (UTC) Received: (qmail 28249 invoked by uid 500); 1 Dec 2011 18:42:24 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 28199 invoked by uid 500); 1 Dec 2011 18:42:24 -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 28191 invoked by uid 99); 1 Dec 2011 18:42:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 18:42:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qw0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 18:42:18 +0000 Received: by qabg14 with SMTP id g14so1718391qab.2 for ; Thu, 01 Dec 2011 10:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2Lcc8CH023M+X0wr9WQu5WNBnCDvpXBomf1dUPk/2Oo=; b=jDtH+8/B8Af6O3Ep03m6AncXm1xBLS8/SnrGutV90Bxw0US7DJojjeh3VI8eQSxfjY sxEZCt2k1ZoS3WxQIqcZM+Ct/Q28SN5agIDPrKBKMaSXWlRtHnJBzs4yiTBnMW+YNNWX n//NVA3/cm00FaGGgUC9Rff7D2U2UnIlEpFPc= MIME-Version: 1.0 Received: by 10.224.34.202 with SMTP id m10mr146852qad.62.1322764917148; Thu, 01 Dec 2011 10:41:57 -0800 (PST) Received: by 10.229.181.138 with HTTP; Thu, 1 Dec 2011 10:41:57 -0800 (PST) In-Reply-To: References: Date: Thu, 1 Dec 2011 18:41:57 +0000 Message-ID: Subject: Re: Buffering producer messages 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 That is all good, but don't use static:(failover://) for the network connector, just use static:(tcp:// ) and the network connector will handle any failure by restarting the network bridge. failover: can get in the way of network bridge recovery/restart and leave the network bridge in limbo. It is intended for use with jms clients, the network bridge is a little more than a plain jms client as it multiplexes messages from many clients and monitors advisories and control messages etc. On 1 December 2011 10:22, Joe Carter wrote: > As I require persistence on the messages, I configured the embedded > broker to use the MemoryPersistenceAdapter. > This allows me to set the persistent flag which I presume will be > carried forward into my remote broker which really will persist the > message. > My network connector using the following URI: > static:(failover:(nio://localhost:61616)?trackMessages=true) so I > shouldn't lose any messages from the embedded to the remote broker. > I do realise that a failure of the process with the embedded broker > will lose any in-flight messages that haven't made it to the remote > broker, but for my application that risk is acceptable. > Let me know if that doesn't do what I expect. > > Thanks for the help. > Joe > > On 30 November 2011 16:25, Gary Tully wrote: >> the typical activemq way to do that is use an embeded vm broker and a >> network connector to forward messages to the target when it can. >> Disable persistence and it will use a memory store so it will be have >> like a buffer. >> >> On 29 November 2011 16:27, Joe Carter wrote: >>> Hi, >>> >>> Does anyone know how to configure the connection factory so that it >>> will buffer messages while there's a temporary outage to the broker? >>> Basically the same as the "Buffered JMS client" in the IBM MQ product >>> http://www-10.lotus.com/ldd/lewiki.nsf/dx/01022009113953AMBJANPR.htm >>> At the moment my application receives exceptions until the connection >>> recovers and I can't afford to block (its a soft real time app). >>> If not I'll write my own wrapper but I'd be surprised if there's not >>> one out there already. >>> >>> Thanks >>> Joe >> >> >> >> -- >> http://fusesource.com >> http://blog.garytully.com -- http://fusesource.com http://blog.garytully.com