$ npm install pulsar-client
const Pulsar = require('pulsar-client');(async () => {const client = new Pulsar.Client({serviceUrl: 'http://*', // Replace with the access address (copied from the **Cluster Management** page in the console)authentication: Pulsar.NewAuthenticationToken("eyJh**"), // Replace with the token});await client.close();})();
Was this page helpful?