You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/22 17:24:08 UTC

[GitHub] [pulsar-client-node] iamrmin opened a new issue #141: Event listener if client disconnect or connection interruption

iamrmin opened a new issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141


   It would be great to have a callback at Client level that trigger if connection break in-between.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-node] massakam edited a comment on issue #141: Event listener if client disconnect or connection interruption

Posted by GitBox <gi...@apache.org>.
massakam edited a comment on issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141#issuecomment-786417959


   @iamrmin On the producer side, we should be able to notice that the connection has been lost because message sending times out (the duration can be changed with the `sendTimeoutMs` property) and an exception is thrown. On the consumer side, there is currently no way to notice that the connection has been lost except by looking at the error log.
   
   The Node.js client is a wrapper of Pulsar C++ client and the C++ client doesn't have such feature. So it is currently difficult to implement such a callback...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-node] massakam commented on issue #141: Event listener if client disconnect or connection interruption

Posted by GitBox <gi...@apache.org>.
massakam commented on issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141#issuecomment-785540884


   @iamrmin If the connection is disconnected from the server side, the client will automatically reconnect and the application should not need to detect it. Could you tell me why you need such a callback?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-node] iamrmin commented on issue #141: Event listener if client disconnect or connection interruption

Posted by GitBox <gi...@apache.org>.
iamrmin commented on issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141#issuecomment-785629877


   @massakam ok but what if it takes hours and days to reconnect. Though I am not sure what is a timeout my concern here is healthcheck. It somehow should be know that pulsar is down and i am looking for any kind of callback.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-node] iamrmin commented on issue #141: Event listener if client disconnect or connection interruption

Posted by GitBox <gi...@apache.org>.
iamrmin commented on issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141#issuecomment-786419050


   @massakam I see. Thank you :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-node] massakam commented on issue #141: Event listener if client disconnect or connection interruption

Posted by GitBox <gi...@apache.org>.
massakam commented on issue #141:
URL: https://github.com/apache/pulsar-client-node/issues/141#issuecomment-786417959


   @iamrmin On the producer side, we can notice that the connection has been lost because message sending times out (the duration can be changed with the `sendTimeoutMs` property) and an exception is thrown. On the consumer side, there is currently no way to notice that the connection has been lost except by looking at the error log.
   
   The Node.js client is a wrapper of Pulsar C++ client and the C++ client doesn't have such feature. So it is currently difficult to implement such a callback...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org