Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-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 DCDF5723F for ; Tue, 20 Sep 2011 22:20:28 +0000 (UTC) Received: (qmail 16103 invoked by uid 500); 20 Sep 2011 22:20:28 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 16080 invoked by uid 500); 20 Sep 2011 22:20:28 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 16072 invoked by uid 99); 20 Sep 2011 22:20:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 22:20:28 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tross@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 22:20:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8KMK13u023994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Sep 2011 18:20:01 -0400 Received: from localhost.localdomain (dhcp-100-18-1.bos.redhat.com [10.16.18.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8KMK0NH006674 for ; Tue, 20 Sep 2011 18:20:00 -0400 Message-ID: <4E791165.9040409@redhat.com> Date: Tue, 20 Sep 2011 18:19:17 -0400 From: Ted Ross User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: routing messages to another broker that has lost connection References: <4E78F998.1000704@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Did you use a large number for the --ack argument in the route? Try using 1. It appears that the ack-batching is quite literal and the downstream broker *only* acks on modulo-N messages (i.e. it doesn't ack gratuitously after a period of inactivity). -Ted On 09/20/2011 05:22 PM, Brandon Pedersen wrote: > Thank you! This almost works ;) I was worried about doing this because > I didn't want the local source queue to fill up because I wouldn't be > popping messages off it but it looks like it handles it properly and > removes them from the source queue when they have been pulled to the > destination exchange....awesome. > > However, I shutdown the destination broker, use spout to generate a > message, and then restart the destination broker. The message that was > missed while the broker was down is received but so is every past > message that was already received before the broker went down but with > redelivered set to true. I don't even know where these messages come > from because the queue on the source broker does not have any of those > messages. How can I get it to not receive the messages it has already > received? > > Thanks, > > -Brandon > > On Tue, Sep 20, 2011 at 2:37 PM, Ted Ross wrote: >> Brandon, >> >> You can do this with a queue route (i.e. the downstream broker subscribes to >> an existing queue). >> >> Static exchange routes may be durable, meaning they will reappear after a >> restart, but their queues are always transient. Furthermore, when the route >> is down, there is no queue to hold the messages produced. >> >> If you create a queue, then establish a queue route to draw from that queue, >> the messages will accumulate there when the downstream broker is >> disconnected. >> >> When you set up the route in qpid-route, use the --ack N option with an N >> greater than zero. This causes the brokers to acknowledge messages and will >> ensure that in-doubt messages (i.e. in flight during the failure) will be >> re-transmitted upon reconnection. >> >> The qpid-route syntax is: >> >> qpid-route [OPTIONS] queue add >> [mechanism] >> >> where is the name of the exchange on where messages >> will be delivered to and is the name of the queue on >> where messages will be received from. >> >> -Ted >> >> On 09/20/2011 03:46 PM, Brandon Pedersen wrote: >>> I am trying to get something like this working: >>> >>> - publish a message to a local exchange >>> - have the message get pushed to a remote exchange (or >>> pulled...preferably pushed) >>> and >>> - if the remote broker goes down, when it comes back up it will >>> receive all messages it missed while it was down >>> >>> I can get the first 2 working with a simple static route. However, >>> when the remote broker goes down it does not receive any of the >>> messages that were sent while it was down. Is there any way to do >>> this? And everything is being marked as durable (the queue, the >>> exchange, the binding, and the route) >>> >>> Thanks, >>> >>> -Brandon >>> >>> --------------------------------------------------------------------- >>> Apache Qpid - AMQP Messaging Implementation >>> Project: http://qpid.apache.org >>> Use/Interact: mailto:users-subscribe@qpid.apache.org >>> >> >> --------------------------------------------------------------------- >> Apache Qpid - AMQP Messaging Implementation >> Project: http://qpid.apache.org >> Use/Interact: mailto:users-subscribe@qpid.apache.org >> >> > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:users-subscribe@qpid.apache.org > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org