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 BA7DE200C29 for ; Tue, 28 Feb 2017 13:34:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B8E13160B7C; Tue, 28 Feb 2017 12:34:49 +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 0BC27160B6A for ; Tue, 28 Feb 2017 13:34:48 +0100 (CET) Received: (qmail 93856 invoked by uid 500); 28 Feb 2017 12:34:48 -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 93847 invoked by uid 99); 28 Feb 2017 12:34:48 -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; Tue, 28 Feb 2017 12:34:48 +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 A6F3018DBE3 for ; Tue, 28 Feb 2017 12:34:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.347 X-Spam-Level: X-Spam-Status: No, score=-2.347 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652] 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 FF1quz7CLNTX for ; Tue, 28 Feb 2017 12:34:46 +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 4CEF35FC3C for ; Tue, 28 Feb 2017 12:34:46 +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 94F64E053A for ; Tue, 28 Feb 2017 12:34:45 +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 402A624156 for ; Tue, 28 Feb 2017 12:34:45 +0000 (UTC) Date: Tue, 28 Feb 2017 12:34:45 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-1336) Full support for async messaging and correlation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 28 Feb 2017 12:34:49 -0000 [ https://issues.apache.org/jira/browse/CAMEL-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-1336. -------------------------------- Resolution: Won't Fix > Full support for async messaging and correlation > ------------------------------------------------ > > Key: CAMEL-1336 > URL: https://issues.apache.org/jira/browse/CAMEL-1336 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 1.5.0 > Reporter: Hadrian Zbarcea > Assignee: Hadrian Zbarcea > Fix For: Future > > > This is a feature that has been requested by users a few times, and it's time to get addressed. > Camel does not really support 2x 1-way async messaging. It sorta does in camel-jms, by sending a message to a queue and setting the "JMSCorrelationID" header. For a ExchangePattern.InOut it immediately waits for a response (up to a timeout period) and gets the reply and continues processing. > There are a few issues with this approach: > * this mechanism is not available across all camel components. There are other camel components that support async 1 way messaging such as file/ftp, mail, mina, cxf, etc. > * there can be no other processing between a message is sent and a reply is received. > * the timeout value is short and keeps resources locked, we cannot have long running transactions > My proposal is to: > * move the mechanism from jms into core (and improve it) > * use a correlation mechanism (that will be different for different components, such as MessageID in camel-mail) to correlate inputs with outputs. The correlation mechanism could be implicit or explicit. > * provide a storage for pending 2x 1-way async UOWs (multiple options available) > A route would then look something like this: > {code} > from("direct.start") > .setHeader("reply-to", constant("hadrian@localhost; copy@localhost")) > .correlate(header("Message-ID")) > .to("smtp://someone@localhost?password=secret&to=otherone@localhost") > from("pop3://hadrian@localhost?password=secret).correlate(header("Message-ID")) > .from("some-other-source") > .aggregate(header("foo")).to("direct:end"); > {code} > *note*: the multiple from(s). > * This also gives unlimited time for a reply to be received. > * I don't think support for acid transactions makes any sense in such case. > * The presence of correlate() in the pipeline causes automatic storage of the uow > * The presence of correlate() after a from() causes the removal of the uow from persistent store. > Any ideas? -- This message was sent by Atlassian JIRA (v6.3.15#6346)