From issues-return-49332-archive-asf-public=cust-asf.ponee.io@camel.apache.org Fri Feb 9 11:28:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id B133D180676 for ; Fri, 9 Feb 2018 11:28:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A207A160C2E; Fri, 9 Feb 2018 10:28:05 +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 E961F160C4C for ; Fri, 9 Feb 2018 11:28:04 +0100 (CET) Received: (qmail 71147 invoked by uid 500); 9 Feb 2018 10:28:02 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 71136 invoked by uid 99); 9 Feb 2018 10:28:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2018 10:28:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED7DD180119 for ; Fri, 9 Feb 2018 10:28:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id A8c1Ly5rycR0 for ; Fri, 9 Feb 2018 10:28:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D65D95F178 for ; Fri, 9 Feb 2018 10:28:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 74CA9E0153 for ; Fri, 9 Feb 2018 10:28:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 35A8C240FA for ; Fri, 9 Feb 2018 10:28:00 +0000 (UTC) Date: Fri, 9 Feb 2018 10:28:00 +0000 (UTC) From: "Pascal Schumacher (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-12249) Camel-JMS: transferExchange - send ExchangeProperties can not be accessed before first endpoint in route MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Pascal Schumacher created CAMEL-12249: ----------------------------------------- Summary: Camel-JMS: transferExchange - send ExchangeProperties can not be accessed before first endpoint in route Key: CAMEL-12249 URL: https://issues.apache.org/jira/browse/CAMEL-12249 Project: Camel Issue Type: Bug Components: came-jms Affects Versions: 2.20.2 Reporter: Pascal Schumacher I am using Camel 2.20.2 and ActiveMQ 5.14.5 with the _transferExchange_ option enabled. When I read a message from a queue the send custom _ExchangeProperties_ are not set. After the exchange is routed to the first endpoint the send _ExchangeProperties_ are set. Unittest to replicate: {code:java} public class JmsTransferExchangeAccessExchangePropertiesBeforeFirstEndpointTest extends CamelTestSupport { @Test public void testSendExchangeAndAccessExchangePropertiesBeforeFirstEndpoint() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedBodiesReceived("Hello World"); mock.expectedPropertyReceived("bar", 123); template.send("direct:start", new Processor() { public void process(Exchange exchange) throws Exception { exchange.getIn().setBody("Hello World"); exchange.setProperty("bar", 123); } }); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("direct:start").to(getUri()); from(getUri()) // .to("log:debug") this line has uncommented to make the test pass .choice().when(exchangeProperty("bar").isEqualTo(123)).to("mock:result"); } }; } protected String getUri() { return "activemq:queue:foo?transferExchange=true"; } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory(); camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory)); return camelContext; } } {code} The test fails, but if I uncomment the __.to("log:debug")__ line it passes. The test also fails with current master of camel. -- This message was sent by Atlassian JIRA (v7.6.3#76005)