Procces callbacks after timeout

"이희승 (Trustin Lee)" trustin at gmail.com
Thu Nov 11 04:36:18 EST 2010


angelctmex wrote:
> I have a question about camel Netty briefly tell them that I'm consuming a
> service from another company which is exposed through the sockets, however I
> have set a timeout of 30 seconds per application, once that time expired and
> I will return it a specific response to the system that originated the
> request, but sometimes the other company sent me the response to my request
> after the timeout, so I need to give special treatment to these responses,
> however my questions are:
> 1) As I can process those responses that arrive after the timeout?

You need to maintain the set of timed-out requests so that you can
determine if the received response is the late one.

> 2) How I can make this process is asynchronous?, Once used as camel-mine,
> but I read that is more efficient netty.

To handle timeout, you will have to use a timer.  I recommend you to use
HashedWheelTimer in org.jboss.netty.util.

HTH

-- 
Trustin Lee - http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 290 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20101111/53f0532f/attachment-0001.bin 


More information about the netty-users mailing list