[ 
https://issues.apache.org/jira/browse/THRIFT-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hamed Madani updated THRIFT-2058:
---------------------------------

    Description: 
Update: updated the patch to re-enable emitting the 'error' event.
"error" events get turned into exceptions if they aren't listened for.  If the 
user handled this error then we should try to reconnect.

I've added reconnect support to node.js library. 
added 4 new parameters to options:

debug : (true or false) when true console.log reconnect events
max_attempts : max number of reconnect attempts before giving up
retry_max_delay : max time in millisecond between retry attempts
connect_timeout : max time before giving up  reconnect attempts

also added two new functions : 
initialize_retry_vars() initialize the retry variables. 
connection_gone() gets called on 'close' event and tries to reconnect the 
connection.

  was:
Update: updated the batch to re-enable emitting the 'error' event.
"error" events get turned into exceptions if they aren't listened for.  If the 
user handled this error then we should try to reconnect.

I've added reconnect support to node.js library. 
added 4 new parameters to options:

debug : (true or false) when true console.log reconnect events
max_attempts : max number of reconnect attempts before giving up
retry_max_delay : max time in millisecond between retry attempts
connect_timeout : max time before giving up  reconnect attempts

also added two new functions : 
initialize_retry_vars() initialize the retry variables. 
connection_gone() gets called on 'close' event and tries to reconnect the 
connection.

    
> Add reconnect support to node.js library
> ----------------------------------------
>
>                 Key: THRIFT-2058
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2058
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Node.js - Library
>            Reporter: Hamed Madani
>         Attachments: thrift-2058-nodejs-reconnect-v2.patch
>
>
> Update: updated the patch to re-enable emitting the 'error' event.
> "error" events get turned into exceptions if they aren't listened for.  If 
> the user handled this error then we should try to reconnect.
> I've added reconnect support to node.js library. 
> added 4 new parameters to options:
> debug : (true or false) when true console.log reconnect events
> max_attempts : max number of reconnect attempts before giving up
> retry_max_delay : max time in millisecond between retry attempts
> connect_timeout : max time before giving up  reconnect attempts
> also added two new functions : 
> initialize_retry_vars() initialize the retry variables. 
> connection_gone() gets called on 'close' event and tries to reconnect the 
> connection.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to