🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Solace in typescript on node server

jojojo
jojojo Member Posts: 5

Hi we’ve implemented a solace topic subscriber on our node server with solclientjs.

We currently working with requiring a js module to handle all the solace stuff and that works. But we’re looking to update this to tyoescript.

Would be awesome if you can add @types not really typescript at the moment.

Could not find a declaration file for module 'solclientjs'. '.../node_modules/solclientjs/lib/solclientjs-exports.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/solclientjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'solclientjs';`ts(7016)

are there any alternatives here ?

Another quick thing if you're reading this... Are there anyway to implement failover URLs for solclientjs.

I know other java services currently listing on the same pubsub are connecting by something like this

solacehost : url1;url2

Are there any alternatives for solclientjs here ?

Best Answer

  • amackenzie
    amackenzie Member, Employee Posts: 269 Solace Employee
    #2 Answer ✓

    Hi,
    We are working on TypeScript types declaration for SolClientJS and you should be seeing something in the next couple of weeks (possibly sooner).

    As for connecting to a hostlist for failover, the solace.SessionProperties.url property can take and array of urls.

Answers