The Salesforce Streaming Subscriber is a Visual Studio Code extension that allows you to manage and interact with Salesforce platform events and any streaming api directly from your workspace. This tool is designed to increase efficiency and streamline the development process when working with Salesforce.
This extension provides an interface within VS Code to:
- Connect to Salesforce and fetch org information. (Automatically detects the default org in your workspace)
- Subscribe and Unsubscribe from Salesforce Platform Events and other streaming channels such as CDC or Topics.
- Add and delete nodes to manage multiple event subscriptions.
- View the event data in real-time using the built-in Output Channel of VS Code.
After installing the extension, you can view the org data by expanding the Salesforce Org Info tree in the Explorer view. This provides you with details about the connected Salesforce org, such as the Access Token, Api Version, Connected Status, Org Id, Instance URL, SfdxAuthUrl, and Username.
The Salesforce Streaming Subscriber extension provides a tree view of all the events you've subscribed to in your Salesforce org. You can add new nodes to this tree by right-clicking on the tree view and selecting "Add Channel." You'll be prompted to enter the name of the channel/event you wish to subscribe to.
Once a node is added, you can click on it to subscribe to the corresponding event. The extension will then start receiving the event messages and display them in a dedicated Output Channel.
You can also unsubscribe from an event by right-clicking on the corresponding node and selecting "Delete Node." This will unsubscribe from the event and remove the node from the tree view.
The extension provides the following commands:
eventNames.addChannel
: Add a new node to the event tree.eventNames.runNodeCommand
: Subscribe to the event corresponding to the selected node.eventNames.deleteNode
: Unsubscribe from the event corresponding to the selected node and remove the node from the tree.eventNames.showOutputChannel
: Display the Output Channel containing the event data for the selected node.orgData.showData
: Display sensitive data for the connected Salesforce org.
- Visual Studio Code
- Salesforce CLI
- Salesforce DX
- A Salesforce org
- Open Visual Studio Code.
- Press
Ctrl+P
to open the Quick Open dialog. - Type
ext install your-extension-id
to find and install the Salesforce Streaming Subscriber extension. - Reload Visual Studio Code.
If you discover any bugs or have a feature request, please feel free to open an issue on GitHub.
MIT
If you have any questions or comments, please feel free to contact me at [email protected]
This extension is not an official Salesforce product. It is a tool created by me to easily subscribe to streaming api channels in vscode.