Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9C9C710692 for ; Tue, 12 Nov 2013 14:14:22 +0000 (UTC) Received: (qmail 21059 invoked by uid 500); 12 Nov 2013 14:14:21 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 21037 invoked by uid 500); 12 Nov 2013 14:14:20 -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 21013 invoked by uid 99); 12 Nov 2013 14:14:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Nov 2013 14:14:20 +0000 Date: Tue, 12 Nov 2013 14:14:20 +0000 (UTC) From: "Hadrian Zbarcea (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-6648) Create a Fluent ProducerTemplate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-6648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hadrian Zbarcea resolved CAMEL-6648. ------------------------------------ Resolution: Won't Fix A better approach would be to create a DSL for creating messages specific to the application domain. The low level ProducerTemplate could then stay simple. > Create a Fluent ProducerTemplate > -------------------------------- > > Key: CAMEL-6648 > URL: https://issues.apache.org/jira/browse/CAMEL-6648 > Project: Camel > Issue Type: New Feature > Components: camel-core > Reporter: Raul Kripalani > Assignee: Raul Kripalani > Fix For: Future > > Attachments: CAMEL-6648.zip, FluentProducerTemplate.java, FluentProducerTemplateTest.java, ProducerTemplateBuilder.java, ProducerTemplateBuilderTest.java > > > Create a Fluent ProducerTemplate so that users can use it in the following manner: > \\ > \\ > {code} > // initialize ProducerTemplate with a default endpoint > FluentProducerTemplate template = new FluentProducerTemplate("activemq:queue:foo"); > MyResponse response = > template.newExchange().toDefaultEndpoint() > .withBody("this is slick") > .withHeader("MyHeader1", "HeaderValue") > .withHeader("MyHeader2", "HeaderValue2") > .resultAs(MyResponse.class) > .dispatchInOut(); // or inOnly(), asyncInOut() > {code} > -- This message was sent by Atlassian JIRA (v6.1#6144)