Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 11302 invoked from network); 24 Nov 2009 16:55:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Nov 2009 16:55:21 -0000 Received: (qmail 30466 invoked by uid 500); 24 Nov 2009 16:55:21 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 30420 invoked by uid 500); 24 Nov 2009 16:55:20 -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 30410 invoked by uid 99); 24 Nov 2009 16:55:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 16:55:20 +0000 X-ASF-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [24.96.163.171] (HELO mailchs.commitent.com) (24.96.163.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 16:55:17 +0000 Received: from Commitchs1.commitent.com ([192.168.3.10]) by Commitchs1.commitent.com ([192.168.3.10]) with mapi; Tue, 24 Nov 2009 11:54:56 -0500 From: Cullen Davis To: "users@qpid.apache.org" Date: Tue, 24 Nov 2009 11:54:54 -0500 Subject: RE: Request to Add autoDelete Parameter to qpid-route command Thread-Topic: Request to Add autoDelete Parameter to qpid-route command Thread-Index: AcpsNxi+Lu1IAcHyRSOr2zB2fmtHqgA7BLwH Message-ID: <951EAAA951E3AD4B82B5B30AA2A0AF2BE41D60963E@Commitchs1.commitent.com> References: <951EAAA951E3AD4B82B5B30AA2A0AF2BE41D60962D@Commitchs1.commitent.com>,<4B0A7D11.5030807@redhat.com> In-Reply-To: <4B0A7D11.5030807@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 > I'd argue that if you are specifying durable that implies you don't want > auto deletion (durable is really only of any value in recovering from > loss of in-memory state and in that case you would have lost the session > and triggered auto-delete anyway). (The attached trivial patch would do > this I believe, though perhaps it unnecessarily couples the durability > of the bridge meta-data with the durability of the queue used in which > case a 'reliable' option might be preferred). Thank you for the reply Gordon - you really gave me a lot to think about. = I realized that I still don't fully understand the intent of --durable. Our requirement for the federated brokers are:=20 - Federated messages have a finite lifetime. - A federated connection must provide for a route that survives a broker re= start. - All federated messages pending a dequeue must persist across a broker res= tart. - All federated messages pending a dequeue must persist across an extended = network outage. =20 We used the --durable option on the qpid-route command in so that the route= would survive broker restarts. Is this inconsistent with our requirement?= =20 We set the persistent property on the messages to provide for the queue sta= te to be journaled so that messages survive restarts. =20 I expect the patch to allow the bridge-queue from being deleted. (the patc= h code should be in a test environment shortly) > Having a timeout for a queue such that if there is no subscriber for x > seconds then the queue gets deleted might be a useful addition. That > would allow some protection over the case where a failed link never > comes back (or doesn't come back fast enough to avoid a critical build > up of messages). To provide for the case where a link never comes back up, I would expect th= e application to provide a system configuration such that the qpid journal = files would be capable of storing a typical =93pending connect=94 queue loa= d (based on message frequency and time-to-live). To go one step further, c= ould the =93bridge-queue=94 be created such that it could have a a policy t= ype of RING? In this way, the onus of message capacity and availability i= n disconnected environments is placed with the application owners configura= tion. =20 Your thoughts would be greatly appreciated. =20 Cullen J. Davis CommIT Enterprises, Inc. ________________________________________ From: Gordon Sim [gsim@redhat.com] Sent: Monday, November 23, 2009 7:16 AM To: users@qpid.apache.org Subject: Re: Request to Add autoDelete Parameter to qpid-route command On 11/20/2009 08:50 PM, Cullen Davis wrote: > Synopsis: > Dynamic federation does not guarantee delivery of messages. Setting auto= Delete=3Dfalse on the =93transit-queue=94 during dynamic federation queue c= reation would eliminate the issue. > > Summary: > Our solution utilizes Qpid 0.5 C++ brokers and clients running on Red Hat= Enterprise Linux 5.4. We are a government backed project that must deploy= onto networks that are low bandwidth, high latency, and intermittently dis= connected. Guaranteed delivery of the messages is a fundamental requiremen= t. Our solution depends on brokers using direct exchanges and being dynami= cally federated. Using dynamic federation, when network connectivity is lo= st for more than seven minutes, all messages awaiting federation are delete= d. At re-connect, the federation routes are rebuilt but the unsent message= s are not restored. (Originally Stated in users mailing list on Thu, 05 No= v, 16:55) > > Change Request: > Allow Dynamic Federation to create =93transit-queues=94 with autoDelete= =3DFalse. We would like to request a new option, autoDelete, on the qpid-r= oute command. In our case, we would run > qpid-route --durable --autodelete=3Dfalse dynamic add brokerB brokerA= fed.direct > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > This would be used to create exchange bindings with transit-queues having= the autoDelete property set to false. I'd argue that if you are specifying durable that implies you don't want auto deletion (durable is really only of any value in recovering from loss of in-memory state and in that case you would have lost the session and triggered auto-delete anyway). (The attached trivial patch would do this I believe, though perhaps it unnecessarily couples the durability of the bridge meta-data with the durability of the queue used in which case a 'reliable' option might be prefered). Having a timeout for a queue such that if there is no subscriber for x seconds then the queue gets deleted might be a useful addition. That would allow some protection over the case where a failed link never comes back (or doesn't come back fast enough to avoid a critical build up of messages). > Details: > We federate our brokers as follows: > qpid-route --durable dynamic add brokerB brokerA fed.direct > > The dynamic option causes the qpid-route command to create a new =93trans= it-queue=94, with the name "bridge-queue" at brokerA. The bridge-queue ser= ves as the means to move messages from brokerA to brokerB. The new queue h= ad queue properties of durable=3DFalse, exclusive=3DTrue and autoDelete=3DT= rue. > > If the network connection is broken for more than seven minutes, the sess= ion on brokerB subscribing to the "bridge-queue" on brokerA is considered t= o have ended. The loss of the session subscriber triggers the the autoDele= te of the bridge-queue. The result is that all messages awaiting federatio= n via the bridge queue are deleted (NOT persisted at all). > > Ted Ross suggested a work around. He suggested we create a =93queue=94 r= oute where the destination broker subscribes to an existing queue on the s= ource broker. This should cause the inter-broker route to use message ackn= owledgement in such a way that recovery will be clean. > > We encountered the following issues with the queue route: > 1) =93Out-of-order=94 message delivery was experienced > 2) The first 1000KB of message data (in our case 10 messages) were not de= livered until the broker process was restarted. This sounds crazy but we r= eplicated the case multiple times. That sounds like a session is not being correctly cleaned up perhaps and there are some unacked messages in a locked state. Would you be willing to raise a Jira for this and list the steps taken to reproduce? > 3) Our solution loses the ability to do dynamic binding. > > Our customer needs to have the in-order, guaranteed delivery of messages = on low quality networks. > > How should we proceed with this request? > > > Cullen Davis > CommIT Enterprises, Inc > > > --------------------------------------------------------------------- > 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