Zeebe-node fails to connect if broker loaded after worker

I’m using zeebe-node 0.23.2 for my worker
and single broker v0.23.1 (docker compose yaml from zeebe-docker-compose)
whenever broker restarts, the worker does not reconnect
I’ve setup retries and onReady and other hooks - they don’t seem to function.
I saw this: https://github.com/creditsenseau/zeebe-client-node-js/issues/164
My questions -
When is the 0.23.3 expected (assuming it resolves this issue)?

Is there a reliable workaround (e.g. way to detect the disconnect, then create new ZBClient() object, or simply restart the docker container)? e.g. the client has a connected property - can I sample it periodically? I’ve tried onReady() and onConnectionError() hooks - they don’t work


1 Like

Hi @Eetay, the pure JavaScript client in 0.23.3 has some issues - including this. I am rolling it back to the C client at the moment.

I will have a new version this week.

You might want to try out a previous version of the client (like 0.22) to see if that fixes it for you.

Another point is that retries give up after 50 attempts by default, so about 2 minutes. You can set the maxRetries to a very large value.

In this new version, I’m setting this to infinite.

Thanks @jwulf
Will wait for your update, we’re currently just completing our evaluation. We’re very excited about Zeebe!

1 Like

Try 0.23.3: https://www.npmjs.com/package/zeebe-node

Tx, @jwulf
It works! node client reconnects after restarting broker + the ‘onReady’ handler is called !

I found 2 non-critical issues:
(1) the ‘onConnectionError’ was not called on disconnect - note I did a “docker-compose restart zeebe” so the restart was fast. I did get the GRPC errors in the client’s log though, but no call to ‘onConnectionError’
(2) My worker microservice is built “FROM node:12”; I had to revert back to “FROM node:10” due to failure to install zeebe-node, originating from failure to install grpc module, due to failure while installing dependency “segfault-handler@1.3.0” - apparently node 12 is not shipped with required header files and node-gyp fails
To sum up, zeebe-node is not installing on that particular docker image (node:12). Obviously this is not a zeebe-node direct issue, just thought you’d like to know


1 Like


I am getting a new release ready, and I will remove the segfault-handler. It emits a crash log if you opt-in for the pure JS implementation and it seg faults. But I’ve had trouble with it too - i had to explicitly add npm rebuild to my docker build script.

I’ll check out the onConnectionError issue too.

Here is a blog post about the Node client: https://zeebe.io/blog/2020/06/zeebe-client-2020/