Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 86809 invoked from network); 15 Oct 2010 14:31:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Oct 2010 14:31:12 -0000 Received: (qmail 74752 invoked by uid 500); 15 Oct 2010 14:31:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 74438 invoked by uid 500); 15 Oct 2010 14:31:10 -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 74418 invoked by uid 99); 15 Oct 2010 14:31:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:31:09 +0000 X-ASF-Spam-Status: No, hits=4.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.158 is neither permitted nor denied by domain of slew77@googlemail.com) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:31:03 +0000 Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1P6lIv-00056K-TV for users@camel.apache.org; Fri, 15 Oct 2010 07:30:42 -0700 Date: Fri, 15 Oct 2010 07:30:41 -0700 (PDT) From: slew To: users@camel.apache.org Message-ID: <1287153041909-3213809.post@n5.nabble.com> In-Reply-To: References: <1287086705620-3212752.post@n5.nabble.com> <1287089726454-3212817.post@n5.nabble.com> Subject: Re: Cross context connections, SEDA and BlockQueues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Thanks for taking the time to answer Stan. I'll have another go at trying = to get camel to convert the exception. I have a snapshot of the 2010.02 servicemix-camel component which I think handles the jbi part, I'll try updating to the latest to make sure I haven't just got a bug in my version. Stan Lewis wrote: >=20 > I believe the servicemix-camel component handles this already, i.e. > it'll convert an exception to a JBI fault and send it back as a > response, assuming the MEP allows for it. >=20 > On Thu, Oct 14, 2010 at 4:55 PM, slew wrote: >> >> Hi Stan, >> >> Thanks for the response and clarifying the blocking queue question, make= s >> perfect sense now. >> >> I feel more comfortable about continuing with the JBI endpoints now, so >> thanks again. =C2=A0One difficulty I'm having (i've posted this on the s= mx >> forum >> today, so sorry if this counts as a repost), but I'm not sure about the >> recommended way to propagate exceptions using the jbi component in camel= . >> As the exchange goes through the NMR, I guess the exceptions need to be >> marshalled somehow, but I'm not sure of the recommended way to do this. >> Should I trap the exceptions and convert them to a JBIFault manually or >> should I let the camel component do some of this? =C2=A0I've tried setti= ng the >> convertException flag, but don't see any difference and in both cases >> lose >> the original exception. =C2=A0Alternatively, I can set a property on the >> exchange >> containing the exception and set the exchange as faulted, or turn the >> exception into xml and propagate it that way as the fault body, but I >> want >> to make sure I'm not fighting the intended way of doing things and >> missing >> the recommended approach. >> >> Thanks for any more advice, >> Steve. >> >> >> >> Stan Lewis wrote: >>> >>> Hi Steve, >>> >>> On Thu, Oct 14, 2010 at 4:05 PM, slew wrote: >>>> >>>> Hi, >>>> >>>> In our application we have a routing slip that is configured at runtim= e >>>> to >>>> invoke endpoints from "plugin" camel routes (camel 2.3) that are >>>> provided >>>> in >>>> a separate camel context. =C2=A0We are using smx 3, so these plugins a= re >>>> packaged >>>> as separate JBI assemblies. >>>> >>>> I'm trying to work out the best method to communicate between these >>>> contexts. =C2=A0The original way I used was with the VM component. =C2= =A0For >>>> performance, I had to set the concurrentConsumers property, but this >>>> has >>>> a >>>> drawback in that the consumer threads are fixed and so as the number o= f >>>> plugins increases the number of waiting threads increases. >>>> >>>> I've been looking at replacing this with JBI, as I'm currently using >>>> SMX3. >>>> This has thrown up some other questions, but as we'd look to move to >>>> SMX4 >>>> at >>>> some point (possibly soon) and JBI is not really the future of SMX, I'= m >>>> wondering if there are better alternatives. >>> >>> You can use JBI in either SMX3 or SMX4 so it's a good migration path, >>> i.e. you should be able to continue using JBI endpoints when moving to >>> SMX4 and then you can migrate them to something else. =C2=A0For new stu= ff >>> in SMX4 you can use the NMR component - >>> http://camel.apache.org/nmr.html which I think might be better suited >>> in an OSGi environment than the VM transport. =C2=A0And also you can al= ways >>> use JMS as well, probably more useful if you want to persist messages >>> between routes to avoid losing messages. >>> >>>> Going back to the VM solution. =C2=A0The documentation has the followi= ng: >>>> >>>>> Be aware that adding a thread pool to a SEDA endpoint by doing >>>>> something >>>>> like: >>>>> from("seda:stageName").thread(5).process(...) >>>>> Can wind up with two BlockQueues: one from the SEDA endpoint, and one >>>>> from >>>>> the workqueue of the thread pool, which may not be what you want. >>>> >>>> I'm not sure exactly what this means, could someone explain it to me >>>> please >>>> - really sorry if it's a thick question? =C2=A0I assume it's not sayin= g >>>> there's a >>>> potential for a dead lock, but I can't work out what else it means. >>>> =C2=A0Would >>>> this be the correct approach in my scenario, i.e. so that more threads >>>> are >>>> working when the route is busy, less when it's not? >>> >>> I think it's a little typo, it should be BlockingQueues, meaning that >>> a message would first go into the SEDA BlockingQueue, then wind up in >>> the thread pool's BlockingQueue, so would introduce a performance >>> impact. >>> >>>> Is there a better solution to this cross-context connections, e.g. JMS= , >>>> ActiveMQ. =C2=A0I like the VM approach as it works nicely with excepti= on >>>> propagation. >>>> >>>> I'd really appreciate anyones advice on this. =C2=A0Please let me know= if >>>> you >>>> need me to clarify anything. >>>> >>>> Thanks, >>>> Steve. >>>> -- >>>> View this message in context: >>>> http://camel.465427.n5.nabble.com/Cross-context-connections-SEDA-and-B= lockQueues-tp3212752p3212752.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>> >>> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Cross-context-connections-SEDA-and-Blo= ckQueues-tp3212752p3212817.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >=20 >=20 --=20 View this message in context: http://camel.465427.n5.nabble.com/Cross-conte= xt-connections-SEDA-and-BlockQueues-tp3212752p3213809.html Sent from the Camel - Users mailing list archive at Nabble.com.