Pulsar Client for VSCode
A Visual Studio Code extension for Apache Pulsar, providing cluster management, message production/consumption, and topic monitoring capabilities.
Features
Cluster Management
- Add and remove Pulsar cluster connections
- Support for local, remote, and cloud clusters
- Token-based authentication (JWT) for StreamNative Cloud and secured clusters
- Secure credential storage using system keychain
Explorer View
Navigate your Pulsar infrastructure with an intuitive tree view:
- Clusters → Tenants → Namespaces → Topics
- View subscriptions and their details
- Monitor broker information
Topic Operations
- Create and delete topics (partitioned and non-partitioned)
- View topic statistics and details
- Real-time dashboard with auto-refresh
- Copy topic names to clipboard
Message Producer
- Produce messages via WebSocket
- Support for message keys
- Custom properties
- Real-time send confirmation
Message Consumer
- Consume messages in real-time via WebSocket
- Choose starting position (Latest or Earliest)
- JSON message formatting
- Message acknowledgment
Subscription Management
- Create and delete subscriptions
- Reset subscription position
- View subscription details and backlog
Installation
From VSIX
- Download the
.vsix file
- In VSCode, go to Extensions →
... menu → "Install from VSIX..."
- Select the downloaded file
From Source
git clone https://github.com/davidepetti/vscode-pulsar-client.git
cd vscode-pulsar-client
npm install
npm run bundle
Usage
Adding a Local Cluster
- Click the
+ button in the Pulsar Clusters view
- Enter a name for your cluster (e.g.,
local)
- Enter the Web Service URL:
http://localhost:8080
- Select "None" for authentication
Adding StreamNative Cloud
- Click the
+ button in the Pulsar Clusters view
- Enter a name for your cluster (e.g.,
streamnative-prod)
- Enter your StreamNative Web Service URL (e.g.,
https://your-instance.streamnative.cloud:443)
- Select "Token" for authentication
- Paste your JWT token from the StreamNative Cloud console
To get your token from StreamNative:
- Log in to the StreamNative Cloud Console
- Navigate to your cluster → Service Accounts
- Create or select a service account
- Generate a new token and copy it
Producing Messages
- Right-click on a topic in the explorer
- Select "Produce Message"
- Enter your message payload (JSON or text)
- Optionally add a message key and properties
- Click "Send Message"
Consuming Messages
- Right-click on a topic in the explorer
- Select "Consume Messages"
- Enter a subscription name
- Select starting position:
- Latest: Only receive new messages
- Earliest: Receive all messages from the beginning
- Click "Start Consuming"
Viewing Topic Details
- Right-click on a topic
- Select "Topic Details" or "Topic Dashboard"
- View real-time statistics including:
- Producer/Subscription counts
- Message rates
- Storage size
- Backlog information
Requirements
- Visual Studio Code 1.90.0 or higher
- Apache Pulsar cluster (standalone or distributed)
Configuration
The extension contributes the following settings:
| Setting |
Description |
Default |
pulsar.logLevel |
Log level (info/debug) |
info |
pulsar.requestTimeout |
API request timeout in ms |
60000 |
pulsar.clusters |
Saved cluster configurations |
[] |
Running Pulsar Locally
For testing, you can run a Pulsar standalone instance:
docker run -it -p 6650:6650 -p 8080:8080 apachepulsar/pulsar:latest bin/pulsar standalone
Commands
| Command |
Description |
Pulsar: Add Cluster |
Add a new cluster connection |
Pulsar: Refresh |
Refresh all views |
Pulsar: Find Topic |
Search for a topic |
Pulsar: Find Subscription |
Search for a subscription |
Known Issues
- WebSocket connections may timeout after extended periods of inactivity
- Some Pulsar admin endpoints may require additional permissions
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
License
MIT License - see LICENSE file for details.
Acknowledgments