The `solclientjs` package provides a JavaScript API for connecting Node.js, browser, and mobile applications to a Solace Event Broker. It enables applications to send and receive messages using various messaging patterns like publish/subscribe. The current stable version is 10.18.3, and it follows a regular maintenance and update cadence, often tied to Solace Event Broker releases. Key differentiators include its focus on high-performance messaging specifically with Solace Event Brokers, offering distinct API variations (Debug, Full, Production) that balance performance optimization, minification, and logging verbosity. This library is designed for robust enterprise messaging environments, providing a programmatic interface to Solace's advanced messaging capabilities. It is proprietary software intended solely for use with a Solace Event Broker under specific license terms.
npm install solclientjsVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to connect to a Solace Event Broker, subscribe to a topic, and publish a message using the `solclientjs` API.
Review the Solace software license terms at https://solace.com/license-software before using this package, as it is proprietary and intended for use with Solace Event Brokers.
API documentation is no longer bundled with the package; refer to the online documentation for Node.js (https://docs.solace.com/API-Developer-Online-Ref-Documentation/nodejs/index.html) or Browser (https://docs.solace.com/API-Developer-Online-Ref-Documentation/js/index.html).
Choose the appropriate API variation (production, full, or debug) during `require` or `import` based on performance and logging needs. `production` is minified with limited logs, `full` has more logs, and `debug` has all logs with no minification.
After receiving and processing a message, call `message.destroy()` to release associated resources and prevent memory leaks. This is critical for high-throughput applications.
Verify `sessionProperties.url`, `vpnName`, `userName`, `password` against your Solace Event Broker configuration. Ensure the broker is running and accessible from the client's network.
Check topic permissions for the client username and ensure the topic syntax is correct and allowed by the broker's Access Control Lists (ACLs).
Ensure you are importing `solace` correctly as `import * as solace from 'solclientjs';` for ESM/TypeScript or `const solace = require('solclientjs');` for CommonJS. `SolclientFactory` should then be accessible as a property of the main `solace` object.No dependency data recorded yet.