tag:blogger.com,1999:blog-2032285244295551020.post576760226012350..comments2022-04-11T13:30:51.938-07:00Comments on Thomas Termin's blog: Netty TCP client with reconnect handlingttermhttp://www.blogger.com/profile/03591017599520402536noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-2032285244295551020.post-26454818495622350482019-07-11T08:54:28.856-07:002019-07-11T08:54:28.856-07:00Hi Thomas, I believe I have an improvement on this...Hi Thomas, I believe I have an improvement on this reconnecting Netty client in 2019.<br />In the methods to reconnect in the Handler and Connection listener, make sure the Event Loop you pass is the same event loop from your client, by calling client.getEventLoop() or similar.<br /><br />Cheers, <br />John<br />Anonymoushttps://www.blogger.com/profile/16490122870967184790noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-24014920061946137492017-03-15T06:10:19.049-07:002017-03-15T06:10:19.049-07:00This worded great for me. I ported the code to sca...This worded great for me. I ported the code to scala at: <br /><br />https://github.com/trex-paxos/trex/blob/netty0.1/netty/src/main/scala/com/github/trex_paxos/netty/Client.scala<br /><br />I added a send method to transmit and the ability to pass in an optional handler to handle the response. A simple test driver is at: <br /><br />https://github.com/trex-paxos/trex/blob/netty0.1/netty/src/it/scala/com/github/trex_paxos/netty/TestClient.scala<br /><br />Many thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-48426200632061191892015-10-20T23:49:57.498-07:002015-10-20T23:49:57.498-07:00No. You just schedule a new runnable with the exis...No. You just schedule a new runnable with the existing event loop. ttermhttps://www.blogger.com/profile/03591017599520402536noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-17804637504887779942015-10-19T18:59:07.667-07:002015-10-19T18:59:07.667-07:00just out of curiosity, will this create too much t...just out of curiosity, will this create too much thread if many failures happens in a short amount of time?Anonymoushttps://www.blogger.com/profile/08979286337651434862noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-253232576443968772015-02-16T10:55:24.700-08:002015-02-16T10:55:24.700-08:00Is this not what I did in my handler? What do you ...Is this not what I did in my handler? What do you mean is wrong here?ttermhttps://www.blogger.com/profile/03591017599520402536noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-26616705996425058852015-02-16T01:18:41.016-08:002015-02-16T01:18:41.016-08:00A more standard way of achieving this would be usi...A more standard way of achieving this would be using EventLoop.schedule(), see e.g. https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/uptime/UptimeClientHandler.javaGilad Bar Orionhttps://www.blogger.com/profile/03094786388433103728noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-41168647078447585002014-11-07T07:18:39.745-08:002014-11-07T07:18:39.745-08:00Hi,
cool that it helped someone.
ThomasHi, <br /><br />cool that it helped someone.<br /><br />Thomasttermhttps://www.blogger.com/profile/03591017599520402536noreply@blogger.comtag:blogger.com,1999:blog-2032285244295551020.post-60336145052935612882014-11-04T02:32:19.253-08:002014-11-04T02:32:19.253-08:00Hello There,
You just saved my day with this solu...Hello There,<br /><br />You just saved my day with this solution. Worked perfectly for me :)<br /><br />Thank you very much.sevrnhttps://www.blogger.com/profile/18159887600566546725noreply@blogger.com