From users-return-6244-apmail-qpid-users-archive=qpid.apache.org@qpid.apache.org Wed May 2 18:55:22 2012 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 65450C859 for ; Wed, 2 May 2012 18:55:22 +0000 (UTC) Received: (qmail 5076 invoked by uid 500); 2 May 2012 18:55:22 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 5041 invoked by uid 500); 2 May 2012 18:55:22 -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 5033 invoked by uid 99); 2 May 2012 18:55:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 18:55:22 +0000 X-ASF-Spam-Status: No, hits=3.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [207.97.245.145] (HELO smtp145.iad.emailsrvr.com) (207.97.245.145) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 18:55:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp24.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 0577B1A03EB for ; Wed, 2 May 2012 14:54:57 -0400 (EDT) X-Virus-Scanned: OK Received: from legacy28.wa-web.iad1a (legacy28.wa-web.iad1a.rsapps.net [192.168.2.150]) by smtp24.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id E64AA1A03DA for ; Wed, 2 May 2012 14:54:56 -0400 (EDT) Received: from smartasking.com (localhost [127.0.0.1]) by legacy28.wa-web.iad1a (Postfix) with ESMTP id C0D36C98079 for ; Wed, 2 May 2012 14:54:56 -0400 (EDT) Received: by apps.rackspace.com (Authenticated sender: m.luchak@smartasking.com, from: m.luchak@smartasking.com) with HTTP; Wed, 2 May 2012 14:54:56 -0400 (EDT) Date: Wed, 2 May 2012 14:54:56 -0400 (EDT) Subject: Re: Messaging Flow Design in Qpid From: m.luchak@smartasking.com To: users@qpid.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative;boundary="----=_20120502145456000000_24706" Importance: Normal X-Priority: 3 (Normal) X-Type: html In-Reply-To: <4FA17E90.8060907@blueyonder.co.uk> References: <1335980528.978124940@apps.rackspace.com> <4FA17E90.8060907@blueyonder.co.uk> Message-ID: <1335984896.785721787@apps.rackspace.com> X-Mailer: webmail7.0 X-Virus-Checked: Checked by ClamAV on apache.org ------=_20120502145456000000_24706 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =0AThanks Fraser,=0A =0AWe are using the C++ broker - selectors working cli= ent side is ok for us, but even so I would be wary of implementing feature= s that are not supported. That said, it seems a pretty harmless hack and ta= king care not to create a binding loop would actually be trivial in our par= ticular case... so I guess I'll sleep on it ;)=0A =0AAny insight on my seco= nd question? Is there a simpler way to bind/unbind a queue to multiple exc= hanges?=0A =0Athanks again,=0AMatthew=0A =0A-----Original Message-----=0AFr= om: "Fraser Adams" =0ASent: Wednesday, May 2= , 2012 2:36pm=0ATo: users@qpid.apache.org=0ASubject: Re: Messaging Flow Des= ign in Qpid=0A=0A=0A=0AHi Matthew,=0AI think that "technically" the answer = is "no" however you could use =0Afederation (with a little teeny bit of twe= aking).=0A=0ASo it's possible to use qpid-route to federate between two bro= kers =0Ahowever there's a line in qpid-route that throws an exception if yo= u try =0Ato do this -it moans about linking on the same host.=0A=0AHowever.= ..... the broker actually happily allows this.=0A=0AI hacked the qpid-route= addLink method thus...=0A=0A def getLink(self):=0A links =3D self.agent.ge= tObjects(_class=3D"link")=0A for link in links:=0A if self.remote.match(lin= k.host, link.port):=0A return link=0A return None=0A=0A def addLink(self, r= emoteBroker, interbroker_mechanism=3D""):=0A self.remote =3D BrokerURL(remo= teBroker)=0A #if self.local.match(self.remote.host, self.remote.port):=0A #= raise Exception("Linking broker to itself is not permitted")=0A=0A brok= ers =3D self.agent.getObjects(_class=3D"broker")=0A broker =3D brokers[0]= =0A link =3D self.getLink()=0A if link =3D=3D None:=0A=0ASo literally just = commented out the test for self.local.match and the =0Araise Exception and = it works - one can federate from one exchange to =0Aanother on the same bro= ker.=0A=0A=0AIt's slightly controversial :-) but I wanted to see if it was = possible. =0AYou'd want to be careful to avoid circular routes etc.=0A=0ABu= t this approach might be what you're looking for unless someone can =0Acome= up with a better mechanism.=0A=0ABTW federation only works with the C++ br= oker IIRC correctly so this =0Amight be an issue for you I believe that you= were planning on using the =0AJava broker (which gives you broker side mes= sage selectors) :-/=0A=0AFrase=0A=0A=0A=0AOn 02/05/12 18:42, m.luchak@smart= asking.com wrote:=0A> Hi All,=0A>=0A> Thanks for all your help with the sel= ector questions that I had last week. We are conducting more tests to see = if Qpid is the solution for our architecture but we have some doubts...Our = flow requires that exchanges subscribe to exchanges and queues in turn subs= cribe to multiple exchanges.=0A>=0A> 1) Is it possible to bind Exchanges to= Exchanges? I have seen some posts giving an emphatic NO: ([http://qpid.21= 58936.n2.nabble.com/how-to-bind-exchange-to-exchange-like-bind-exchange-to-= queue-in-the-same-broker-td6385448.html] http://qpid.2158936.n2.nabble.com/= how-to-bind-exchange-to-exchange-like-bind-exchange-to-queue-in-the-same-br= oker-td6385448.html)=0A>=0A>=0A> 2) The x-binding syntax , that I have enco= untered, for binding a queue to multiple exchanges seems a little convolute= d and the last time I asked you guys for help I discovered wonderful new si= mplified classes and methods :). Is the following example the best practic= e for creating multiple bindings?=0A>=0A> x-bindings:[{queue:MYQUEUE,exchan= ge:'FIRST_EXCHANGE',key: 'binding1', arguments:{'x-match':any,'a':'10'}}, {= queue:MYQUEUE ,exchange:'SECOND_EXCHANGE',key: 'binding2', arguments: {'x-= match':any,'a':'10'}}]=0A>=0A> If so I would need to persist the "binding k= eys" (binding1, binding2) in order to remove the bindings later.=0A>=0A>=0A= >=0A> thanks for all your help,=0A> Matthew=0A>=0A=0A=0A-------------------= --------------------------------------------------=0ATo unsubscribe, e-mail= : users-unsubscribe@qpid.apache.org=0AFor additional commands, e-mail: user= s-help@qpid.apache.org=0A=0A ------=_20120502145456000000_24706--