https://github.com/pcon/sf-cli-pubsub
A toolchain to help with pubsub related tasks.
https://github.com/pcon/sf-cli-pubsub
pubsub salesforce salesforce-cli salesforce-cli-plugin
Last synced: 11 months ago
JSON representation
A toolchain to help with pubsub related tasks.
- Host: GitHub
- URL: https://github.com/pcon/sf-cli-pubsub
- Owner: pcon
- Created: 2025-06-22T13:27:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-20T07:00:14.000Z (11 months ago)
- Last Synced: 2025-07-21T23:46:56.227Z (11 months ago)
- Topics: pubsub, salesforce, salesforce-cli, salesforce-cli-plugin
- Language: TypeScript
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @pcon/sf-cli-pubsub
[](https://www.npmjs.com/package/@pcon/sf-cli-pubsub) [](https://npmjs.org/package/@pcon/sf-cli-pubsub)
## Setup
### Install Latest
```
sf plugins install @pcon/sf-cli-pubsub
```
You will be prompted to confirm that you want to install an unsigned plugin. Choose "yes"
```
This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: y
```
To allowlist this plugin, [add an entry for it in $HOME/.config/sfdx/unsignedPluginAllowList.json](https://developer.salesforce.com/blogs/2017/10/salesforce-dx-cli-plugin-update.html).
### Install Older Version
```bash
sf plugins install @pcon/sf-cli-pubsub@x.y.z
```
## Issues
Please report any issues at https://github.com/pcon/sf-cli-pubsub/issues
## Commands
- [`sf pubsub subscribe`](#sf-pubsub-subscribe)
## `sf pubsub subscribe`
Subscribes to one or more topics.
```
USAGE
$ sf pubsub subscribe -o --topic ... [--json] [--flags-dir ] [-c ] [--api-version
]
FLAGS
-c, --count= [default: 100] The number of messages to watch for.
-o, --target-org= (required) Username or alias of the target org. Not required if the `target-org`
configuration variable is already set.
--api-version= Override the api version used for api requests made by this command
--topic=... (required) The topic to subscribe to.
GLOBAL FLAGS
--flags-dir= Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Subscribes to one or more topics.
Connects to a pub / sub endpoint and logs the message to the console.
EXAMPLES
$ sf pubsub subscribe --target-org myTargetOrg --topic "/data/CaseChangeEvent" --topic "/event/My_Event**e" --topic "/data/My_Object**ChangeEvent"
```
_See code: [src/commands/pubsub/subscribe.ts](https://github.com/pcon/sf-cli-pubsub/blob/1.2.1/src/commands/pubsub/subscribe.ts)_