From dev-return-38495-apmail-qpid-dev-archive=qpid.apache.org@qpid.apache.org Mon Nov 26 11:21:19 2012 Return-Path: X-Original-To: apmail-qpid-dev-archive@www.apache.org Delivered-To: apmail-qpid-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9FD8D18E for ; Mon, 26 Nov 2012 11:21:18 +0000 (UTC) Received: (qmail 35857 invoked by uid 500); 26 Nov 2012 11:21:18 -0000 Delivered-To: apmail-qpid-dev-archive@qpid.apache.org Received: (qmail 35821 invoked by uid 500); 26 Nov 2012 11:21:18 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 35786 invoked by uid 99); 26 Nov 2012 11:21:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 11:21:16 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.250.139 is neither permitted nor denied by domain of eugen.rabii@gmail.com) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 11:21:11 +0000 Received: from jim.nabble.com ([192.168.236.80]) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Tcwk6-0000G2-Ni for dev@qpid.apache.org; Mon, 26 Nov 2012 03:20:50 -0800 Date: Mon, 26 Nov 2012 03:20:50 -0800 (PST) From: eugene To: dev@qpid.apache.org Message-ID: <1353928850674-7583501.post@n2.nabble.com> In-Reply-To: <50AF893C.2020007@redhat.com> References: <1353677938343-7583454.post@n2.nabble.com> <50AF893C.2020007@redhat.com> Subject: Re: x-bindings misunderstanding MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello Gordon, Sorry about the last email, seems like stuff are working now, sort of. But I think I found another problem, to make sure we are on the same path, here is my Consumer again: Queue receiverQ = session.createQueue("receiverQ; " + "{create:always, auto-delete:true, exclusive:true, node:{x-bindings:[{exchange:'amq.topic', key:'producerQ'}]}}"); MessageConsumer consumer = session.createConsumer(receiverQ); consumer.setMessageListener(new MyMessageListener()); while(true){} And my producer: String ALTERNATE_EXCHANGE = "amq.topic"; String requestsQueue ="producerQ34; {create:always, node:{x-declare:{auto-delete:true, exclusive:true, alternate-exchange: '"+ALTERNATE_EXCHANGE+"'}}}"; // + Session session = createSession(); MessageProducer producer = session.createProducer(session.createQueue(requestsQueue)); TextMessage message = session.createTextMessage("Some Payload"); producer.send(message); Thread.sleep(10 * 1000); Start broker, start Consumer, start Producer, kill Producer. Expected: message will come into the Consumer I have. De facto: It does. Everything is fine in the case above. Then, without restarting the broker: Edit the key in the consumer: Queue receiverQ = session.createQueue("receiverQ; " + "{create:always, auto-delete:true, exclusive:true, node:{x-bindings:[{exchange:'amq.topic', key:'123producerQ456'}]}}"); Start Consumer, start Producer, kill Producer. Expected: because the routing key is different, the message should not come into the consumer. De facto : it does. It looks like the broker does some caching, because if I re-start the broker, and run the case above(case 2), no message hits my listener. btw, I can post the code on bitbucket of alike, in case you need it. I sent the logs also to your email. Thank You, Eugene. -- View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/x-bindings-misunderstanding-tp7583454p7583501.html Sent from the Apache Qpid developers mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org For additional commands, e-mail: dev-help@qpid.apache.org