Connect to Streaming API Events in VSCode via "Salesforce Event Subscriber"


Hey there, fellow devs! ๐
Guess what? I've created this amazing extension that has boosted my development game! You know how we sometimes juggle between tons of apps to subscribe to various streaming channels, just to check out the incoming messages? I bet you've thought, "There's gotta be a better way to do this, right?" And guess what, now there is! Say hello to the Event Subscriber Extension for Visual Studio Code. ๐
What is the Event Subscriber Extension?
The Event Subscriber Extension, developed by me, is a revolutionary new extension for Visual Studio Code that allows developers to subscribe to different streaming channels directly within the IDE. It aims to streamline the development process by minimizing the need to switch between different applications, thereby maximizing productivity.
How to Install
You can find the Event Subscriber Extension on the Visual Studio Code Marketplace at this link. Installation is as straightforward as it gets. All you have to do is:
Open Visual Studio Code.
Click on the Extensions view icon or hit
Ctrl+Shift+X
.Search for "Salesforce Event Subscriber".
Click on Install.
And voila! You're ready to start subscribing to streaming channels right inside VS Code.
How to Use
Before you start using the Salesforce Event Subscriber in Visual Studio Code, make sure you have these two things ready:
A workspace with your default org all set up.
2. At least read-only access for the user who's subscribing to the object. This way, they can view the object they're interested in.
With these pre-requisites in place, you'll be good to go! ๐
Once installed, the Event Subscriber Extension is incredibly easy to use. Here's a brief guide:
The extension is available as an activity sidebar for ease of use with a connect icon.
You can go ahead and add your event.
For Platform events use '/event/YOUR_PLATFORM_EVENT_API_NAME'
For CDC events use '/data/YOUR_CDC_API_NAME'
For Push topic use '/topic/YOUR_TOPIC_API_NAME'
Once you have added the event name, just select the channel list to activate the subscription, or click on "show output channel" to open up the output channel in which the messages are shown. Each channel has a dedicated output channel.
Now publish your events from anywhere and you will see messages coming on the output channel.
Just so you know, the extension also displays some handy info from your organization on the sidebar. If you need to see sensitive details like Access Token and AuthURL, simply hover over the value and click "Show Sensitive Data." This will reveal the info in a convenient little popup.
NOTE: By the way, keep in mind that whenever you restart the workspace or VSCode, all connections are removed and reset on purpose. This way, we make sure not to keep any connections active when VSCode isn't in use.
Benefits
Using the Event Subscriber Extension offers a range of benefits, including:
Streamlining Your Workflow: No more switching between applications. Everything you need is right within VS Code.
Saving Time: By having everything in one place, you can reduce the amount of time spent managing your workspace.
Increasing Productivity: By minimizing distractions and interruptions, you can focus better on coding, thereby improving your productivity.
Future updates (CI/CD)
The pipeline for this extension is seamlessly integrated with a CI/CD process, so no worries, friends! All the updates and new enhancements to this extension will come your way just like every other extension in VS Code. ๐
Conclusion
The Event Subscriber Extension for Visual Studio Code is a game-changer for developers who regularly work with streaming channels. By consolidating your work into a single application, you can enhance your efficiency and productivity, saving valuable time and effort in the process. So why wait? Give the Event Subscriber Extension a try today and experience the difference for yourself!
Remember, the goal of any tool is to simplify our lives, not complicate them. And the Event Subscriber Extension does just that. Happy coding, folks!
Surprise!!!
I have made this open source, so you can go ahead and fork the repo and modify it or improve it accordingly.
Demo
Summary:
The Event Subscriber Extension for Visual Studio Code is a revolutionary new extension that streamlines the development process and maximizes productivity by allowing developers to subscribe to different streaming channels directly within the IDE. It is open source and easy to install and use.
Subscribe to my newsletter
Read articles from Nagendra Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Nagendra Singh
Nagendra Singh
Allow me to introduce myself, the Salesforce Technical Architect who's got more game than a seasoned poker player! With a decade of experience under my belt, I've been designing tailor-made solutions that drive business growth like a rocket launching into space. ๐ When it comes to programming languages like JavaScript and Python, I wield them like a skilled chef with a set of knives, slicing and dicing my way to seamless integrations and robust applications. ๐ฝ๏ธ As a fervent advocate for automation, I've whipped up efficient DevOps pipelines with Jenkins, and even crafted a deployment app using AngularJS that's as sleek as a luxury sports car. ๐๏ธ Not one to rest on my laurels, I keep my finger on the pulse of industry trends, share my wisdom on technical blogs, and actively participate in the Salesforce Stackexchange community. In fact, this year I've climbed my way to the top 3% of the rankings! ๐งโโ๏ธ So, here's to me โ your humor-loving, ultra-professional Salesforce Technical Architect! ๐ฅณ