Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-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 755CB18D2C for ; Sun, 2 Aug 2015 20:21:20 +0000 (UTC) Received: (qmail 61945 invoked by uid 500); 2 Aug 2015 20:21:20 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 61883 invoked by uid 500); 2 Aug 2015 20:21:20 -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 61871 invoked by uid 99); 2 Aug 2015 20:21:19 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2015 20:21:19 +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 6139FC0099 for ; Sun, 2 Aug 2015 20:21:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, 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-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7-tqqx8ckpc5 for ; Sun, 2 Aug 2015 20:21:18 +0000 (UTC) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 831F550685 for ; Sun, 2 Aug 2015 20:21:17 +0000 (UTC) Received: by labow3 with SMTP id ow3so4256455lab.1 for ; Sun, 02 Aug 2015 13:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=FDsJHGeNV2o303o30RnxGDNd7G9yOJTIuYyobEPeUqw=; b=yiwsAiWtSd6EqmGRZsmoDkuxe8daTEz6t4LK7OiN5Jc8ZLEqJh4kKrPkO6WLI2xOcn Up8rHyk4HGWOE5lZ46t0ONAM99dtRH7FyX1OQq6w/5Imz7XLOM1PQdBi+ZB62IIB9814 xRmcx38yNABNZmbyJmNiwWn7C12EwgFMC3PPSWC5l++h4skm9dIUhga12O1BEXiTmND4 u7AP2jK38mU0d78ubWGbngbYaRSJU3vEsFPVrFJrb81KVNqov2Lw2z/yXZh52YHHU2n9 z1zDgJyDHsw3rx9ae4yAOgYkcDnMHomIxcoCeAhcobjLM6F4ZH67dp6fG8OXLVLa+WgW 5xWw== X-Received: by 10.152.2.2 with SMTP id 2mr13927530laq.58.1438546876307; Sun, 02 Aug 2015 13:21:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Henryk Konsek Date: Sun, 02 Aug 2015 20:21:06 +0000 Message-ID: Subject: Re: Some Stupid Questions To: users@camel.apache.org Content-Type: multipart/alternative; boundary=089e013c64708e1fbb051c59cb30 --089e013c64708e1fbb051c59cb30 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, > Is keeping a separate Camelcontext for each route a > best approach, or only if there a lot of traffic of messages then > you should consider separation. The number if the contexts you have doesn't really affects the performance. The number of contexts is rather related to the architecture of your application. For example for the OSGi it makes sense to have the context per bundle (this is what Camel Karaf does) as you would like to deploy new contexts at runtime without affecting the existing flows. But for fat jar application, the more natural approach would be to have a single context (this is what Camel Spring Boot does). Cheers! niedz., 2.08.2015 o 14:05 u=C5=BCytkownik Felix Thomas napisa=C5=82: > Hello, > > I had some doubts so I thought the forum is the best way to get some > answers. > > 1) Since I am using XML DSL earlier Java DSL. > I have a Bean defined like below. Currently the Constructor is passed= . > But How do I make it dynamic i.e. decide based on the route which argumen= t > to pass. Do I need to make always different bean entry for each argument = to > pass. > > class=3D"com.worldline.frida.camel.core.CustomProcessor"> > > > > In java I could write process(new CustomProcessor(CustomConstants.CSV)) > Can I do the same in XML. > > > 2) Threading :- If I have declared a Bean as above and if I use it in a > SPLIT in Parallel processing mode using a Thread profile. Will Camel also > create a Pool of the bean and pass it for each thread. i.e. if my Pool si= ze > is 5 will camel create 5 instance of the bean class and use it in the > processing automatically. I want to know if it will be thread safe for > each bean object. > > > 3) Database component :- If i am getting billions of data from a DB usin= g > a timer component consumer is there any feature that I can mark some colu= mn > with some flag stating it has been processed . > > I saw in the SQL Component there are some option like consumer.onConsume > etc. but is there something similar in JDBC component . Other approach i= s > to move some records to a temporary table and use that but still some fla= g > has to be done on the Original table which is being updated every moment. > > 4) Performance :- Is keeping a separate Camelcontext for each route a be= st > approach, or only if there a lot of traffic of messages then you should > consider separation. > How does camel work incase if you host multiple camelcontext on same > machine and same JVM, > > Rgds > Felix > --089e013c64708e1fbb051c59cb30--