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 9D157D330 for ; Fri, 5 Oct 2012 15:16:13 +0000 (UTC) Received: (qmail 35745 invoked by uid 500); 5 Oct 2012 15:16:13 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 35703 invoked by uid 500); 5 Oct 2012 15:16:13 -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 35695 invoked by uid 99); 5 Oct 2012 15:16:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 15:16:13 +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 (athena.apache.org: domain of claus.ibsen@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-we0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 15:16:09 +0000 Received: by mail-we0-f173.google.com with SMTP id t11so1332798wey.32 for ; Fri, 05 Oct 2012 08:15:47 -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=tnnKmxYD6XouZ2hqhIxQ2SLxf5AMCJb+l+QeCdMZaAQ=; b=PTD2kiDSK6SXhuulKqjAauk4dcVAjy+L7s9MOOVGvMazTa684k42nslFdZvbhWHCJQ gxjb0fSMusLkdLf6dzoXlGPs4TatBBWI17tjOeH4EWGPuDkya7D68EHBxbWMjwvnej6g WDBvkDJugeEAuhoNqr8pSZ+rx/Ig2podQW6HSxGSJkf+iAuMGmwq7oT+NLnJydqv2RMx ibihdUIilRWBi3UqILMW/+iFAEr4H/Hz/ScdO3UXgJifVi6FK+tGNeBxDll/sc6mvSw3 IXqRqVs2EmYq8TJsZUsSN03ViQVrFpj4gPbJ6j+tW3+LJldrdf4gv7gKpUrJhTKHJmqq 8Osg== Received: by 10.216.237.25 with SMTP id x25mr5148154weq.30.1349450147775; Fri, 05 Oct 2012 08:15:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.18.210 with HTTP; Fri, 5 Oct 2012 08:15:27 -0700 (PDT) In-Reply-To: <8EECE6C8A0ED7944B6166E1CCAF815E25996B249B2@2K8EXC01.m4u.com.br> References: <8EECE6C8A0ED7944B6166E1CCAF815E25996B248B8@2K8EXC01.m4u.com.br> <8EECE6C8A0ED7944B6166E1CCAF815E25996B249B2@2K8EXC01.m4u.com.br> From: Claus Ibsen Date: Fri, 5 Oct 2012 17:15:27 +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 X-Virus-Checked: Checked by ClamAV on apache.org Hi I have added an unit test that does netty request/reply async and uses the 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 wrote= : >> Hi Flavio, >> >> You can't do what you're asking for using camel-mina or camel-mina2 at t= his 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 code= that. Its a matter though where and when the 2nd message should be send ba= ck. > 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 sock= et. >>> The point is to answer the messages, they should be send by the same so= cket 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 c= om o Meio Ambiente. >>> O conte=C3=BAdo desta mensagem =C3=A9 confidencial e pode ser privilegi= ado. =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. Co= pying 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 --=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