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 2100AD123 for ; Sat, 6 Oct 2012 09:24:42 +0000 (UTC) Received: (qmail 25227 invoked by uid 500); 6 Oct 2012 09:24:41 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24902 invoked by uid 500); 6 Oct 2012 09:24:40 -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 24853 invoked by uid 99); 6 Oct 2012 09:24:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 09:24:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Oct 2012 09:24:33 +0000 Received: by mail-lb0-f173.google.com with SMTP id gj3so2360151lbb.32 for ; Sat, 06 Oct 2012 02:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=zrQun3hnCAlmm71J3zi9q8lwl7uW+5x9PdcIivbs5EU=; b=r8AfsCOPOTEqQ5pMLUrxXT3iotlWz6bM13QfLy67t052VwY5/aJHjBgUoKEOWRpI3w wssg2oWfuWOFfXUTKlp3R+mbhONUlQYZv0vVEtY7Gc3h2SOCb9a6UK7ml6dmtoC/T99q yIaBJDzftmykIvu/M9ZGmPmHZOkemvJvleLkBVMCRVS1dMbqZ+qiABOV6RTlTc8YTC7i EX0YkCLSWanr5nsQwAniURemib26FnkmibslwBuCI5Dpno7KgBiLGEvPrMHTisFmds8y Fvqjc57jB5nE1bMlvEfmnY/U7xy2y5mqJL1laVP24wC/UvLh7RuDucg8NE5G3Nqm3SP1 2DGQ== Received: by 10.112.27.228 with SMTP id w4mr4694817lbg.118.1349515452361; Sat, 06 Oct 2012 02:24:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.42.9 with HTTP; Sat, 6 Oct 2012 02:23:52 -0700 (PDT) In-Reply-To: <8EECE6C8A0ED7944B6166E1CCAF815E25996B24B93@2K8EXC01.m4u.com.br> References: <8EECE6C8A0ED7944B6166E1CCAF815E25996B248B8@2K8EXC01.m4u.com.br> <8EECE6C8A0ED7944B6166E1CCAF815E25996B249B2@2K8EXC01.m4u.com.br> <8EECE6C8A0ED7944B6166E1CCAF815E25996B24B93@2K8EXC01.m4u.com.br> From: Claus Ibsen Date: Sat, 6 Oct 2012 11:23:52 +0200 Message-ID: Subject: Re: Netty or Mina Async in the same socket To: users@camel.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Oct 5, 2012 at 7:55 PM, Flavio Magacho - M4U wrote: > Claus, Thank you. > It works, I think that I missed the transform tag :). > I Simply set the body. > > But I got some concurrency problems. > I opened 2 connections. . . and it mixes data between them. > Ah yeah we should use an ordered thread pool that Netty offers. I logged a ticket https://issues.apache.org/jira/browse/CAMEL-5689 > Is this component thread safe? > > Thank you! > Magacho > > > -----Original Message----- > From: Claus Ibsen [mailto:claus.ibsen@gmail.com] > Sent: sexta-feira, 5 de outubro de 2012 12:15 > To: users@camel.apache.org > Subject: Re: Netty or Mina Async in the same socket > > Hi > > I have added an unit test that does netty request/reply async and uses th= e same channel to write the response back http://svn.apache.org/viewvc?rev= =3D1394556&view=3Drev > > > > On Thu, Oct 4, 2012 at 3:03 PM, Flavio Magacho - M4U wrote: >> Ok Claus let me try to show you what I=C2=B4m trying to do: >> >> >> >> >> >> >> >> >> >> >> Echo: ${body.text}! >> >> >> >> >> >> >> And I want to write in the same socket that the messages arrives. >> The idea is to make the message exchange process to be Async. >> >> I tried to use the Headers that you said, but they are not Serializable,= so I=C2=B4ll need to write an endpoint based on the camel-netty and keep a= hashmap with the channel and a channel identifier as a key. I Should write= this identifier in the message properties and then, when it comes back, I= =C2=B4ll be able to write it back in the same socket. Does it Makes sense t= o you? >> >> Thanks, >> Magacho >> >> -----Original Message----- >> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] >> Sent: quinta-feira, 4 de outubro de 2012 03:30 >> To: users@camel.apache.org >> Subject: Re: Netty or Mina Async in the same socket >> >> On Thu, Oct 4, 2012 at 12:54 AM, Chad Beaulac wrot= e: >>> Hi Flavio, >>> >>> You can't do what you're asking for using camel-mina or camel-mina2 at = this point in time. >>> >> >> He can grab the netty channel as its enriched on the message as a header= . Then use that channel to write the 2nd message back. He would need to cod= e that. Its a matter though where and when the 2nd message should be send b= ack. >> And what triggers when this should happen. >> >> Maybe you can tell us a bit more about what you do in a Camel route eg? >> >> from netty?sync=3Dfalse >> to ??? >> >> So you want at ?? something to process the incoming message, and use the= same socket to send back a reply message? >> >> >>> Chad Beaulac >>> Objective Solutions, Inc. >>> www.objectivesolutions.com >>> chad@objectivesolutions.com >>> >>> >>> On Oct 3, 2012, at 9:35 AM, Flavio Magacho - M4U wrote: >>> >>>> Hi, >>>> My name is Flavio Magacho. >>>> I have a specific problem: >>>> >>>> I=C2=B4ll receive a socket connection and receive messages in this soc= ket. >>>> The point is to answer the messages, they should be send by the same s= ocket and we can=E2=80=99t use the sync option. >>>> I tried to use Mina and Netty The only way I got to answer in the same= socket is to use the Sync option. >>>> >>>> Did anyone knows how to do that? >>>> >>>> Flavio Magacho >>>> Gerente de Desenvolvimento >>>> Diretoria de Tecnologia da Informa=C3=A7=C3=A3o >>>> M4U >>>> +55 (21) 2546-4050 =E2=96=AA Ramal: 4082 >>>> +55 (21) 8889-1572 >>>> >>>> =C3=BE Antes de imprimir, pense em sua responsabilidade e compromisso = com o Meio Ambiente. >>>> O conte=C3=BAdo desta mensagem =C3=A9 confidencial e pode ser privileg= iado. =C3=89 vedada a sua c=C3=B3pia ou divulga=C3=A7=C3=A3o. >>>> The contents of this message are confidential and may be privileged. C= opying or disclosing is prohibited. >>>> >>>> >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Email: cibsen@redhat.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: cibsen@redhat.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen --=20 Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen