camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anandsk <sku...@arccorp.com>
Subject Re: New Suggested Feature For Mina/Netty
Date Thu, 08 Apr 2010 13:48:25 GMT

I have added improvement request for this feature. you may want to add
comments for your specific needs if they are different.
https://issues.apache.org/activemq/browse/CAMEL-2624


anandsk wrote:
> 
> I have a similar requirement but only difference is I do have a message to
> send but I expect replies in asyncronous fashion. so I would vote for
> suggested feature.
> 
> Though it is not elegant I am thinking of using this solution for now, may
> be it will work for you also and just send a blank message.
> 
> may be you can have a timer consumer instead of file below.
> 
>                 from("file:///test/test/response") 
>                 .convertBodyTo(String.class).threads(1) 
>                
> .to("mina:tcp://localhost:6202?sync=false&textline=true&filters=#listFilters");

>                 
>                 from("vm:response") 
>                 .to("log:+++ reply++++"); 
> 
> public class MessageFilter extends IoFilterAdapter { 
>     @Produce(uri = "vm:response") 
>     ProducerTemplate producer; 
>             @Override 
>             public void messageReceived(NextFilter nextFilter, IoSession
> session, 
>                     Object message) throws Exception { 
>                 if (message instanceof String) { 
>                 producer.sendBody(message); 
>                     } 
>                 
>                 nextFilter.messageReceived(session, message); 
>             } 
>         
> } 
> 
> 
> Gareth Collins wrote:
>> 
>> Hello,
>> 
>> In looking at the source for Netty/Mina, I see that it is assumed that if
>> a consumer is desired a listener port is created, whilst if a producer is
>> desired a client is created.
>> 
>> Would it be possible in a subsequent release to relax this restriction
>> (i.e. allowing a consumer to be a client, a producer to be a server)?
>> 
>> I ask this as I have a requirement to connect to a third-party server
>> periodically to retrieve any outstanding messages. If the server has any
>> outstanding messages it sends them immediately (without me sending any
>> data). When all messages have been sent, the server closes the
>> connection. For now, I will create a custom component for this. However,
>> it would be nice if I could implement this using the generic mina/netty
>> components.
>> 
>> thanks in advance,
>> Gareth Collins
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/New-Suggested-Feature-For-Mina-Netty-tp28167370p28178835.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message