Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 82346 invoked from network); 8 Mar 2010 09:29:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Mar 2010 09:29:35 -0000 Received: (qmail 66525 invoked by uid 500); 8 Mar 2010 09:29:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 66406 invoked by uid 500); 8 Mar 2010 09:29:12 -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 66398 invoked by uid 99); 8 Mar 2010 09:29:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 09:29:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Mar 2010 09:29:10 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NoZGb-0003vA-1r for users@camel.apache.org; Mon, 08 Mar 2010 01:28:49 -0800 Message-ID: <27818866.post@talk.nabble.com> Date: Mon, 8 Mar 2010 01:28:49 -0800 (PST) From: lekkie To: users@camel.apache.org Subject: Re: Blocked endpoints: What EIP 'd be most appropriate? In-Reply-To: <5380c69c1003040543n2f2a9356j45593bc29b0f688a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: lekkie.aydot@gmail.com References: <27777606.post@talk.nabble.com> <5380c69c1003040507i36513681sd73605fee6895266@mail.gmail.com> <27780598.post@talk.nabble.com> <5380c69c1003040530q274ef6edpf2052084a0cd0c74@mail.gmail.com> <27780828.post@talk.nabble.com> <5380c69c1003040543n2f2a9356j45593bc29b0f688a@mail.gmail.com> Am using vm already. Claus Ibsen-2 wrote: >=20 > Hi >=20 > Try to do it in pure Camel, eg using seda, direct, vm etc and not the > NMR or SMX. >=20 >=20 > On Thu, Mar 4, 2010 at 2:38 PM, lekkie wrote: >> >> I saw this and I completely understand it. >> my problem is not that router1 is waiting for initial request to complet= e >> (I'd like it to wait as my request is an InOut), but, I will like it to >> accept another request and respond to the appropriate endpoint (the one >> that >> initiated the request). That does not seem to be happening. >> >> What is happening is that, router1 receives an initial request (and keep >> waiting for a response - which is fine), and receives another request an= d >> sends the output message from initial request as a response to the secon= d >> request. Thats confusing, but it was what I got when I turned on the >> trace >> on the router. >> >> kr. >> >> >> >> >> Claus Ibsen-2 wrote: >>> >>> Well if you take your time to read the VM wiki page, you will notice >>> it extends the SEDA which offers options to configure the blocking >>> >>> http://camel.apache.org/vm >>> http://camel.apache.org/seda.html >>> >>> You can use waitForTaskToComplete to control the blocking behavior >>> >>> >>> On Thu, Mar 4, 2010 at 2:17 PM, lekkie wrote: >>>> >>>> Are you saying that you route to "route1" 2 times? eg kinda like in a >>>> circle? >>>> >>>> You are right. The idea is to make router1 (which is a dynamic >>>> recipient >>>> EIP) to take messages and route to whichever endpoint. It is suppose t= o >>>> be a >>>> central endpoint. Collect msges route to the nxt endpoint and wait to >>>> collect response and send to original requester. >>>> >>>> I didnt expect the router to block when it has not got response from >>>> initial >>>> request (which is why I used vm). Is there a non blocking endpoint tha= t >>>> can >>>> do this? >>>> >>>> I tried this and it worked. >>>> >>>> >>> =C2=A0trace=3D"true"> >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 =C2=A0 =C2=A0 >>>> =C2=A0 =C2=A0 =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> >>>> =C2=A0>>> =C2=A0trace=3D"true"> >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 =C2=A0 =C2=A0 >>>> =C2=A0 =C2=A0 =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> =C2=A0 >>>> >>>> >>>> >>>> Regards. >>>> >>>> >>>> Claus Ibsen-2 wrote: >>>>> >>>>> On Thu, Mar 4, 2010 at 8:50 AM, lekkie wrote= : >>>>>> >>>>>> I have a use case that requires a certain endpoint to be re-used. >>>>>> Lets >>>>>> say >>>>>> the re-usable endpoint is called router1. >>>>>> >>>>>> The flow below causes a blockage on my route and leads to camel >>>>>> throwing >>>>>> exception. >>>>>> >>>>>> consumerEndPoint -> router1 -> someIntermediateEndPoint -> router1`-= > >>>>>> someProviderEndpoint ........ >>>>>> >>>>> >>>>> Are you saying that you route to "route1" 2 times? eg kinda like in a >>>>> circle? >>>>> >>>>> And what does your route1 recipient list do? >>>>> >>>>> All together I suggest to make your use case as simple as possible, t= o >>>>> get something working. >>>>> And then build from there. >>>>> >>>>> And you can change the MEP if you need. >>>>> >>>>>> >>>>>> This flow is an InOut exchange flow. What is happening is that, >>>>>> because >>>>>> the >>>>>> first message passes through router1 and it is still waiting for a >>>>>> response, >>>>>> router1` will wait forever. I think camel throws the exception below >>>>>> >>>>>> 08:29:12,569 | INFO =C2=A0| oLogger-thread-1 | Tracer >>>>>> =C2=A0 | >>>>>> rg.apache.camel.processor.Logger =C2=A0 88 | >>>>>> c66c0dd3-657a-4508-9295-c6f6b6d64a02 >>>>>>>>> (route20) OnException[ExchangeTimedOutException] --> transform[ >>>>>> >>>>>> 08:29:12,569 | ERROR | oLogger-thread-1 | DefaultErrorHandler >>>>>> =C2=A0| >>>>>> rg.apache.camel.processor.Logger =C2=A0202 | Failed delivery for >>>>>> exchangeId: >>>>>> c66c0dd3-657a-4508-9295-c6f6b6d64a02. Processed by failure processor= : >>>>>> Channel[Transform( >>>>>> >>>>>> 08:29:33,653 | INFO =C2=A0| saction-thread-1 | Tracer >>>>>> =C2=A0 | >>>>>> rg.apache.camel.processor.Logger =C2=A0 88 | >>>>>> c36c48b5-e18d-498e-9fed-b340e0baeb05 >>>>>>>>> vm://router1 --> OnException[ExchangeTimedOutException] <<< >>>>>> Pattern:InOut, Headers:{operationName=3Dnull, nmrMessage=3DMessage [= ]}, >>>>>> BodyType:String, Body: >>>>>> >>>>>> 08:29:33,653 | INFO =C2=A0| saction-thread-1 | Tracer >>>>>> =C2=A0 | >>>>>> rg.apache.camel.processor.Logger =C2=A0 88 | >>>>>> c36c48b5-e18d-498e-9fed-b340e0baeb05 >>>>>>>>> (route23) OnException[ExchangeTimedOutException] --> transform[ >>>>>> >>>>>> 8:29:33,653 | ERROR | saction-thread-1 | DefaultErrorHandler >>>>>> =C2=A0| >>>>>> rg.apache.camel.processor.Logger =C2=A0202 | Failed delivery for >>>>>> exchangeId: >>>>>> c36c48b5-e18d-498e-9fed-b340e0baeb05. Processed by failure processor= : >>>>>> Channel[ >>>>>> >>>>>> >>>>>> Loadbalancer is not resolving this as it still ends up sending to >>>>>> same >>>>>> router. >>>>>> >>>>>> See my camel snippets below: >>>>>> >>>>>> >>>>> xmlns=3D"http://camel.apache.org/schema/spring" >>>>>> trace=3D"true"> >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> >>>>>> >>>>>> >>>>> xmlns=3D"http://camel.apache.org/schema/spring" >>>>>> trace=3D"true"> >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> >>>>>> >>>>>> >>>>> xmlns=3D"http://camel.apache.org/schema/spring" >>>>>> trace=3D"true"> >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> =C2=A0 >>>>>> >>>>>> >>>>>> >>>>>> >>>>> xmlns=3D"http://camel.apache.org/schema/spring" >>>>>> trace=3D"true"> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>>>>> method=3D"route"/> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> >>>>>> >>>>>> >>>>> xmlns=3D"http://camel.apache.org/schema/spring" >>>>>> trace=3D"true"> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0>>>>> method=3D"route"/> >>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> What EIP would be the most appropriate for this scenario? >>>>>> >>>>>> kr. >>>>>> -- >>>>>> View this message in context: >>>>>> http://old.nabble.com/Blocked-endpoints%3A-What-EIP-%27d-be-most-app= ropriate--tp27777606p27777606.html >>>>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Claus Ibsen >>>>> Apache Camel Committer >>>>> >>>>> Author of Camel in Action: http://www.manning.com/ibsen/ >>>>> Open Source Integration: http://fusesource.com >>>>> Blog: http://davsclaus.blogspot.com/ >>>>> Twitter: http://twitter.com/davsclaus >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Blocked-endpoints%3A-What-EIP-%27d-be-most-appro= priate--tp27777606p27780598.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Blocked-endpoints%3A-What-EIP-%27d-be-most-appropr= iate--tp27777606p27780828.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >=20 >=20 >=20 > --=20 > Claus Ibsen > Apache Camel Committer >=20 > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >=20 >=20 --=20 View this message in context: http://old.nabble.com/Blocked-endpoints%3A-Wh= at-EIP-%27d-be-most-appropriate--tp27777606p27818866.html Sent from the Camel - Users mailing list archive at Nabble.com.