Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 78AE9200B99 for ; Wed, 21 Sep 2016 02:46:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 772FD160AC9; Wed, 21 Sep 2016 00:46:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B278F160AC5 for ; Wed, 21 Sep 2016 02:46:58 +0200 (CEST) Received: (qmail 30867 invoked by uid 500); 21 Sep 2016 00:46:57 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 30855 invoked by uid 99); 21 Sep 2016 00:46:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2016 00:46:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0289BCAEF7 for ; Wed, 21 Sep 2016 00:46:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.595 X-Spam-Level: *** X-Spam-Status: No, score=3.595 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, KAM_LIVE=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=2.397, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id L4dC3xoNsd7m for ; Wed, 21 Sep 2016 00:46:53 +0000 (UTC) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 0D7C05F1EC for ; Wed, 21 Sep 2016 00:46:53 +0000 (UTC) Received: by mail-io0-f174.google.com with SMTP id q92so37666420ioi.1 for ; Tue, 20 Sep 2016 17:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-transfer-encoding:content-disposition; bh=o5mW1saDWdW5EDgKvhs7PhsIX22i4wA8gvqm8cQbN6I=; b=GDFzyV1/uU892iCFXRAAAqHCQtBByABPo4DKXlKdgzvXho3Mgx1GLgasY8XVik/g7k BiQCIVi5Y3uGt8E+VKkwLa9Hspou3B0S7CNUzCzlNdPU+3+zJUHTPWqaIrNsGD8Z3S/J V69+/J4HJRi7gZRym9zIzl/Hddih4h3M17D2KecPo9uAb51UIMo36elXqjx982snUJGN uuxmCnL2MBdVXIJ+3ynfPGqMl40X5NijmCXgwQviabWwSKt+ZzaEOAjRkAYB54y3ODTB 8gv2TItHbD/50iLLxibQlZx2mfUotyDIkGh94UJCvjTmaPzJu2Adp2MBcr74yhClqorb X6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-transfer-encoding:content-disposition; bh=o5mW1saDWdW5EDgKvhs7PhsIX22i4wA8gvqm8cQbN6I=; b=ABuPbBZ+JXJRHdE3lTEpYiCwY+ZbEvov7qTzbROVYr/ejoThsfx+HUOrvm28vHe86R U16ugyLw2w9xfHv8htXiK6pWL5s3mIcCFV6e/nBqY5wcODKQWjNdgsP01uwfBLygr9Gj eNv7ZcTRQoEsw9N/Kl4UiC7yS65qcXZkq1d1z4hAk1i1aNAT+DbLY8zA38O+tLXn5avH nsB9jKBUv8OwnvG6jvzI+hYywkMfoX13cnPCj0I3oMVr9a3SudQLLfElZlyJ95J5yuwj 1A6RI3psx5xVVNgGdp5xUkOjhpstb+gpSmbPib2cdcqYDZgzB+QLA+XEKuOs16edia1l w3zA== X-Gm-Message-State: AE9vXwPotV/nZ2N/ffu20nqo7/HBWqiDDC8sL5XnsD01Dm02fX1HUik7TYlB1GR+8JSouA== X-Received: by 10.107.16.161 with SMTP id 33mr48239328ioq.41.1474418812552; Tue, 20 Sep 2016 17:46:52 -0700 (PDT) Received: from JiangNingMacBookPro.mail ([114.254.40.173]) by smtp.gmail.com with ESMTPSA id w79sm11951731iow.21.2016.09.20.17.45.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2016 17:46:51 -0700 (PDT) Date: Wed, 21 Sep 2016 08:45:46 +0800 From: Willem Jiang To: users@camel.apache.org, Emre Kartoglu Ismail Message-ID: In-Reply-To: References: Subject: Re: rabbitmq component headers X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline archived-at: Wed, 21 Sep 2016 00:46:59 -0000 Even you specify the routingKey in the rabbitmq uri, camel cannot find ou= t the exchange name without checking it from message header. So you cannot comment out the exchange name setting part.=C2=A0 -- =20 Willem Jiang Blog: http://willemjiang.blogspot.com (English) =20 http://jnn.iteye.com (Chinese) Twitter: willemjiang =20 Weibo: =E5=A7=9C=E5=AE=81willem On September 21, 2016 at 5:14:54 AM, Emre Kartoglu Ismail (ismailemrekart= oglu=40gmail.com) wrote: > Hello Camel users, > =20 > I have a question regarding the camel-rabbitmq component. The following= > code sends the message =E2=80=9Ctest=E2=80=9D to exchange =E2=80=9CA=E2= =80=9D with routing key =E2=80=9CB=E2=80=9D every > 5 seconds: > =20 > =20 > from(=22timer:test=3Fperiod=3D5000=22).process(new Processor() =7B > =40Override > public void process(Exchange exchange) throws Exception =7B > exchange.getOut().setBody(=22test=22, String.class); > exchange.getOut().getHeaders().put(=22rabbitmq.EXCHANGE=5FNAME=22, =22A= =E2=80=9D); ** > exchange.getOut().getHeaders().put(=22rabbitmq.ROUTING=5FKEY=22, =22B=E2= =80=9D); ** > =7D > =7D) > .to(=22rabbitmq://localhost/A=3Fusername=3Dguest&password=3Dguest&routi= ngKey=3DB&threadPoolSize=3D1&autoAck=3Dfalse=22); =20 > =20 > =20 > =20 > However when I comment out the lines with **, the message does not get > sent. Is this an expected behaviour=3F I found this stack overflow post= , > essentially discussing the same issue: > http://stackoverflow.com/questions/22449086/apache-camel-rabbitmq-endpo= int-not-creating =20 > . > =20 > There is a paragraph at http://camel.apache.org/rabbitmq.html that says= > =20 > =22Headers are set by the consumer once the message is received. The > producer will also set the headers for downstream processors once the > exchange has taken place. Any headers set prior to production that the > producer sets will be overridden.=E2=80=9D > =20 > The last sentence seems to suggest that the behaviour I described here > is expected. My question then is would it not make more sense if we did= > not have to specifically set the headers in the out message=3F > =20 > =20 > Kind regards, > Ismail > =20