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 4570819908 for ; Wed, 6 Apr 2016 14:47:01 +0000 (UTC) Received: (qmail 80313 invoked by uid 500); 6 Apr 2016 14:47:01 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 80285 invoked by uid 500); 6 Apr 2016 14:47:01 -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 80268 invoked by uid 99); 6 Apr 2016 14:47:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 14:47:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 43255C0B05 for ; Wed, 6 Apr 2016 14:47:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7ctohMgduJ2z for ; Wed, 6 Apr 2016 14:46:56 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id F05D85F405 for ; Wed, 6 Apr 2016 14:46:55 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id gy3so79917642igb.0 for ; Wed, 06 Apr 2016 07:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=yCJ3tSBLSHraq94UZfkop2+BZJ/1CDlhYgwd1H2kb0k=; b=MLIRn5Z71Pm4xifd7aGJ3ppRQ6ndsTqtY8Qc8Y8Z5F4dRfhROY8cOFlMeonP5nHGQY vz5DUp6a3L+rmxLFGFVie20IN7iWXLysWp6FPqzQH4PvkLfM0f0Stmw7RrfjbfZCGi+c c48mbFQ5zrSjK4fs6S4iGxEvlXbOmT52nIQ4e0/ezeIIrzpGnPpMJ7wMWdwW7Dw0dkFh rs5qVR932oNPmdBGzJU1ludgV1YXWQ7l9wGayPD6/ez7fUZ1SeYFqEhYABts31Zza2Sr x3m3ZnoI0flzUpVtLv5t73d47qVFZbNP5jf0QuIZz0V2IedP2Qof7ynU8T24TceuxNjY EvFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=yCJ3tSBLSHraq94UZfkop2+BZJ/1CDlhYgwd1H2kb0k=; b=LyqGwb2TJ9BsoJ1C956CASg+srUMkYdvKdpQmopFe6hJCCVxgOnkfMogGnZkRyP2VS ArgKcW1D5gSHOsZuYOfBYoObcCf6BkoabWrjl4lncz39bPXM+u4BBUgpFm4ljlo2NHun pR51xwIRdY2ZBIV/qbt8UY08RiPrOZXq37FIcwHmRovhaFs+TmEHVrXt8+FB3/Ri++GJ SwIvCiGti6dzn4kgQh38QlY1GrpWYJQn0uLhDUbAiH5vxdHA4htpNhBRpNQkyoc0ZHIx 2O7H6CgIVWvRAii8BkB2mF2geNT1nqxotvXOXSUbIOTCmOv2wRssN6V/Dc+Q9NFboZTJ dn0A== X-Gm-Message-State: AD7BkJLcsJgxJvYbvf5fU1uoSEefgzbQ6K/xgaYiDemuPwEWXwxiygCZH5HvGkVIUrRCF+tWp5sAHAhl1bNijA== MIME-Version: 1.0 X-Received: by 10.50.17.67 with SMTP id m3mr23878430igd.95.1459954009497; Wed, 06 Apr 2016 07:46:49 -0700 (PDT) Received: by 10.36.131.134 with HTTP; Wed, 6 Apr 2016 07:46:49 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Apr 2016 15:46:49 +0100 Message-ID: Subject: Re: Unroutable messages in Java Qpid Broker 6.0.0 From: Rob Godfrey To: "users@qpid.apache.org" Content-Type: multipart/alternative; boundary=089e0122e720200ae4052fd208ee --089e0122e720200ae4052fd208ee Content-Type: text/plain; charset=UTF-8 Thanks! I'll raise a JIRA to cover this later this afternoon, as well as some for the configuration options we discussed earlier. -- Rob On 6 April 2016 at 15:20, Adel Boutros wrote: > Here it is: > https://qpid.apache.org/releases/qpid-java-6.0.0/java-broker/book/Java-Broker-Concepts-Exchanges.html#Java-Broker-Concepts-Exchanges-UnroutableMessage > When you read the last section "Unrouteable Messages", it is only talking > about message being discarded on the broker and not that the client will > receive an exception. > Regards,Adel > > > Date: Wed, 6 Apr 2016 14:33:07 +0100 > > Subject: Re: Unroutable messages in Java Qpid Broker 6.0.0 > > From: rob.j.godfrey@gmail.com > > To: users@qpid.apache.org > > > > Can you point me at the section in the document you are referencing? > (Most > > of the documentation was written with earlier versions of the protocol in > > mind so there may be a few places where the AMQP 1.0 behaviour differs > from > > that of earlier versions). > > > > -- Rob > > > > On 6 April 2016 at 14:26, Adel Boutros wrote: > > > > > Hello Rob, > > > Thank you for explanation, it makes complete sense and the proposed > > > configuration would indeed be highly valued. > > > So if I understand correctly, today there is no way to configure it. In > > > that case, a workaround would consist in setting for the exchange in > > > question an alternate exchange which will be linked to a queue without > any > > > binding and this will be the queue where all unrouted messages would > arrive > > > (Something like a default queue). Do you agree? > > > Also, would it be possible to update the documentation on the website > to > > > include a mention to this behavior "and will generate an exception on > the > > > JMS client-side"? This is to avoid people having to debug through code > to > > > reach the same findings. > > > Regards,Adel > > > > > > > Date: Wed, 6 Apr 2016 10:18:01 +0100 > > > > Subject: Re: Unroutable messages in Java Qpid Broker 6.0.0 > > > > From: rob.j.godfrey@gmail.com > > > > To: users@qpid.apache.org > > > > > > > > Hi Adel, > > > > > > > > As you have discovered, currently when the Java Broker receives a > message > > > > over AMQP 1.0 where the message cannot be routed to a queue, it > rejects > > > the > > > > message (on the basis that the broker has not actually accepted the > > > > transfer of responsibility as it will be discarding it). This is > > > probably > > > > appropriate when you are looking for the destination to behave like a > > > > "queue" but not when you are expecting "topic" like behaviour. In > > > earlier > > > > versions of AMQP, the client could indicate via the "mandatory" flag > as > > > to > > > > whether the broker should consider the failure to route to be an > error or > > > > not - there is no such mechanism in 1.0. Having said that, I would > > > assume > > > > that for topic like "fire and forget" behaviour, the client should be > > > > sending the transfers pre-settled (since it does not actually care > about > > > > the outcome). It may be that the best solution is to introduce > > > > configuration on the exchange to indicate whether incoming links > should > > > be > > > > sent rejections, or messages silently discarded - and then to be > able to > > > > override this behaviour on a per link basis using some form of link > > > target > > > > property. > > > > > > > > -- Rob > > > > > > > > On 4 April 2016 at 17:30, Adel Boutros wrote: > > > > > > > > > Hello, > > > > > In the documentation of Qpid Java Broker 6.0.0, it is mentioned > here > > > that > > > > > unroutable messages will be discarded eventually. > > > > > I have a test where a queue is bound to a topic and a message is > sent > > > > > which doesn't match the binding filter on purpose. Instead of the > > > message > > > > > being just discarded, the sender is receiving an error informing > him > > > the > > > > > message was rejected. > > > > > Is this expected? shouldn't the sender be "warned" instead of > getting > > > an > > > > > exception? > > > > > Another workaround is to implement a "default" queue which will be > > > called > > > > > from the alternate exchange but I prefer to check with you this > > > behaviour > > > > > before implementing the workaround. > > > > > Test caseCreate topic "T"Create queue "Q"Create binding between T > and Q > > > > > using a binding key BK1Have a consumer listen to QHave a sender > send > > > to T a > > > > > message with a binding key BK2 > > > > > Output client-sidejavax.jms.JMSException: Unknown error from remote > > > peer > > > > > at > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:125) > > > > > at > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpFixedProducer.processDeliveryUpdates(AmqpFixedProducer.java:232) > > > > > at > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:804) > > > > > at > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92) > > > > > at > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:701) > > > > > at > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > > > > > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > > > > > > > > > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) > > > > > at > > > > > > > > > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) > > > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > > > > at java.lang.Thread.run(Thread.java:744) > > > > > Checking the code of > > > > > org.apache.qpid.server.exchange.AbstractExchange#send, when a > queue is > > > not > > > > > found in the routing table of the Exchange and no alternate > exchange is > > > > > defined, then the message is considered as > > > > > org.apache.qpid.amqp_1_0.type.messaging.Rejected. This is what the > > > > > org.apache.qpid.amqp_1_0.type.Outcome has as value. Then client > side, > > > the > > > > > code checks the value of the Outcome and sets an error in case it > was > > > > > rejected. > > > > > > > > > org.apache.qpid.jms.provider.amqp.AmqpFixedProducer#processDeliveryUpdates} > > > > > else if (outcome instanceof Rejected) { > > > > > LOG.trace("Outcome of delivery was rejected: {}", delivery); > > > > > ErrorCondition remoteError = ((Rejected) outcome).getError(); > > > > > if (remoteError == null) { > > > > > remoteError = getEndpoint().getRemoteCondition(); > > > > > } > > > > > > > > > > deliveryError = AmqpSupport.convertToException(remoteError); > > > > > } > > > > > Regards, > > > > > Adel Boutroswww.murex.com > > > > > > > > --089e0122e720200ae4052fd208ee--