setting a new ReadTimeoutHandler for every single write?

"이희승 (Trustin Lee)" trustin at gmail.com
Wed Aug 25 22:45:14 EDT 2010


Hi Joël,

Modifying pipeline is relatively an expensive operation, so I wouldn't
do that.  ReadTimeoutHandler's intention has been to monitor a
connection rather than an individual message.  I'd recommend you to set
your own timeout with the HashedWheelTimer.  You can share the
HashedWheelTimer with ReadTimeoutHandler.

HTH,
Trustin

On 08/24/2010 04:40 PM, stabilit wrote:
> 
> Hi guys
> 
> I am trying to implement an operation timeout for sending messages. So far i
> use Netty ReadTimeoutHandler to time the operation. If the reply is
> outstanding at the time a ReadTimeoutException gets raised i close the
> connection and clean up.
> Now operation timeout varies for message content.
> 
> May i set a new ReadTimeoutHandler for every write or is it very
> inefficient/not designed for that and i better use a separate Timer? I may
> have 500 requests over 500 Channels at the same time so solution should deal
> with resources.
> 
> Did anyone implement similar functionality yet? Or have any suggestion how
> to implement an operation timeout efficiently?
> 
> Thanks in advance, joël

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100826/7c978ade/attachment.bin 


More information about the netty-users mailing list