`solclientjs` v10.18.1 doesn't work with `sslPrivateKey` / `sslCertificate`

ph1234
Wed, 18 Jun 2025 06:45:15 +0000
Solace Event Broker

// see https://docs.solace.com/API-Developer-Online-Ref-Documentation/nodejs/solace.SessionProperties.html
this.#session = s.SolclientFactory.createSession({
  url: this.#url,
  vpnName: this.#vpn,
  authenticationScheme: s.AuthenticationScheme.CLIENT_CERTIFICATE,
  sslPrivateKey: this.#clientKey ?? "/solace-client-certificate/tls.key",
  sslCertificate: this.#clientCertificate ?? "/solace-client-certificate/tls.crt",
  connectRetries: -1,
  reconnectRetries: -1,
  reconnectRetryWaitInMsecs: 60_000
});

Works in version v10.18.0.

Documentation claims it still works like that.

Typescript error:

src/lib/solace.ts:66:7 - error TS2353: Object literal may only specify known properties, and 'sslPrivateKey' does not exist in type 'SessionProperties'.

66       sslPrivateKey: this.#clientKey ?? "/solace-client-certificate/tls.key",

Runtime error:

[inf] <solace> solclientjs:  transport.connectInternal threw: Cannot read properties of null (reading '2')

3 posts - 2 participants