Solace in typescript on node server

Options
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: 260 Solace Employee
    #2 Answer ✓
    Options

    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