camunda-community-hub / zeebe-client-node-js

Node.js client library for Zeebe Microservices Orchestration Engine
https://camunda-community-hub.github.io/zeebe-client-node-js/
Apache License 2.0
152 stars 38 forks source link

How to connector to zeebe gateway without config port #310

Closed gogroup-official closed 1 year ago

gogroup-official commented 1 year ago

My zeebe gateway goes through a proxy and has an endpoint of zeebe.xxx.com/gateway. by default zeebe node will insert port 26500 leading to connection failure. | zeebe | [worker-1] ERROR: Grpc Stream Error: 14 UNAVAILABLE: Name resolution failed for target dns:zeebe.xxx.com/gateway:26500 - zeebe.xxx.com/gateway:26500 Is there any solution to fix this? i just want to configure hostname

jwulf commented 1 year ago

From the test suite:

test('ZBClient constructor appends the port number 26500 to the gatewayAddress by default', () => {
    const zbc = new ZBClient('localhost')
    expect(zbc.gatewayAddress).toBe('localhost:26500')
    zbc.close()
})
test('ZBClient constructor accepts a custom port number for the gatewayAddress', () => {
    const zbc = new ZBClient('localhost:123')
    expect(zbc.gatewayAddress).toBe('localhost:123')
    zbc.close()
})

You just add the port that your gateway is listening on - 443 or 80 or whatever it happens to be.