Skip to content

Commit c6aba66

Browse files
authored
Merge pull request #56 from SolaceLabs/cli-params-cleanup
Updates in this release (0.0.82)
2 parents bcf97dc + 6da40d9 commit c6aba66

57 files changed

Lines changed: 6878 additions & 182 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ store
1111
npm-debug.log*
1212
yarn-debug.log*
1313
yarn-error.log*
14+
tests/*log
1415

1516
# Editor directories and files
1617
.idea

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ apt-get install --only-upgrade stm
8989

9090

9191
#### Download the Archive
92-
For manual installation of the tool directly from archives, navigate to [Git Releases](https://github.com/SolaceLabs/solace-tryme-cli/releases), locate the latest release and review the zip files (approprietly named with the target OS name) under **Assets**. Download the right bundle based on your OS and extract the binary/executable. Move the binary/executable file to a folder that is in the *PATH* or update the path to contain the folder where the file is present.
92+
For manual installation of the tool directly from archives, navigate to [Git Releases](https://github.com/SolaceLabs/solace-tryme-cli/releases), locate the latest release and review the zip files (appropriately named with the target OS name) under **Assets**. Download the right bundle based on your OS and extract the binary/executable. Move the binary/executable file to a folder that is in the *PATH* or update the path to contain the folder where the file is present.
9393

9494
| **For Windows** | **For Linux** | **For Mac** |
9595
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -140,9 +140,9 @@ stm
140140
│ ├── -he, --help-examples /* display examples */
141141
│ ├── init /* initialize command configuration */
142142
│ ├── list /* list command configurations */
143-
│ └── delete /* delete command configuratio */
144-
── manage /* manage connection and resources */
145-
── -h, --help /* display help for command */
143+
│ └── delete /* delete command configuration */
144+
── manage /* manage connection and resources */
145+
── -h, --help /* display help for command */
146146
│ ├── -he, --help-examples /* display examples */
147147
│ ├── connection /* manage VPN connection */
148148
│ ├── semp-connection /* manage VPN SEMP connection */
@@ -159,6 +159,7 @@ stm
159159
├── list /* List event feeds */
160160
├── import /* Import an event feed */
161161
├── export /* Export an event feed */
162+
├── download /* Download an event feed */
162163
└── contribute /* Contribute to community event feeds */
163164
164165
```

documentation/DATAGENERATION_RULES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
| | _**country**_ <br>Returns a random country name. |
6060
| | _**countryCode**_ <br>Returns a random ISO\_3166-1 country code. |
6161
| | _**latitude**_ <br>Generates a random latitude. | minimum \[default: -90\] <br>maximum \[default: 90\] <br>precision \[default: 4\] |
62-
| | _**longitude**_ <br>Generates a random longitude. | minimum \[default: -90\] <br>maximum \[default: 90\] <br>precision \[default: 4\] |
63-
| | _**timeZon**_ <br>Returns a random time zone. |
64-
| **InternetRules** <br>Module to generate internet related entries | _**domainNam**_ <br>Generates a random domain name. | casing \[default: lower\] |
62+
| | _**longitude**_ <br>Generates a random longitude. | minimum \[default: -180\] <br>maximum \[default: 180\] <br>precision \[default: 4\] |
63+
| | _**timeZone**_ <br>Returns a random time zone. |
64+
| **InternetRules** <br>Module to generate internet related entries | _**domainName**_ <br>Generates a random domain name. | casing \[default: lower\] |
6565
| | _**domainWord**_ | |
6666
| | _**email**_ <br>Generates a random email address. | casing \[default: lower\] <br>emoji <br>Generates a random emoji. |
6767
| | _**emoji**_ |
@@ -94,7 +94,7 @@
9494
| | _**price**_ <br>Generates a random price between min and max. | minimum \[default: 1\] <br>maximum \[default: 999\] |
9595
| | _**product**_ <br>Returns a random short product name. |
9696
| | _**productDescription**_ <br>Returns a random product description. |
97-
| | _**productNam**_ <br>Generates a random descriptive product name. | |
97+
| | _**productName**_ <br>Generates a random descriptive product name. | |
9898

9999
## Supported Regular Expression
100100

documentation/EVENT_FEEDS.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ stm
4040
├── list /* List event feeds */
4141
├── import /* Import an event feed from archive file */
4242
├── export /* Export an event feed to Event Portal */
43-
├── archive /* Archive an event feed */
43+
├── download /* Download an event feed as archive */
4444
└── contribute /* Contribute to community event feeds */
4545
```
4646

@@ -140,6 +140,19 @@ Generate a Feed| Validate the Feed
140140

141141
The `configure` sub-command enables setting up data generation rules for *topic* and *payload* parameters. It also allows optional mapping of attributes (e.g., `topic parameter → payload attribute, payload attribute → another attribute`).
142142

143+
```
144+
Usage: stm feed configure [options]
145+
146+
Configure event feed rules
147+
148+
Options:
149+
-feed, --feed-name <FEED_NAME> the feed name
150+
-port, --manage-port [PORT] the port for the manager (default: 0)
151+
152+
/* HELP OPTIONS */
153+
-h, --help display help for command
154+
```
155+
143156
To learn about supported data generation rules, refer to the documentation: [Data Generation Rules](./DATAGENERATION_RULES.md)
144157

145158
An Event Feed configuration exposes feed operations — send and receive events and their schemas. Under the *Messages* group, you can explore all exposed `messages` (events). Selecting a message reveals its details, including `name, schema`, and the `topics` it uses for send and receive operations.
@@ -212,7 +225,7 @@ Options:
212225
-feed, --feed-name <FEED_NAME> the feed name
213226
-events, --event-names <EVENT_NAME...> the event name(s) as space-separated values if listing more than one (e.g., "Loan_Applied" "Loan_Approved" )
214227
-community, --community-feed [BOOLEAN] a community feed (default: false)
215-
-c, --config <CONFIG_FILE> the configuration file (default: "stm-cli-config.json")
228+
--config <CONFIG_FILE> the configuration file (default: "stm-cli-config.json")
216229
217230
/* MESSAGE SETTINGS */
218231
--count <COUNT> the number of events to publish (default: 1)
@@ -226,6 +239,8 @@ Options:
226239
-hm, --help-more display more help for command with options not shown in basic help
227240
-h, --help display help for command
228241
```
242+
243+
> **NOTE**: The `stm feed run` command supports all the messaging parameters available in the `stm send` command, including advanced connection settings, message properties, session settings, and publish settings. For a complete list of all available options (including advanced ones), use the `--help-more` flag or refer to the [Messaging Parameters documentation](./MESSAGING_PARAMETERS.md).
229244
230245
### Streaming via Command-line
231246

documentation/MESSAGING_EXAMPLES.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ stm send --topic solace/try/me --count 100 --interval 5000
5050
5151
stm send --topic "stm/logistics/shipped" "stm/inventory/check"
5252
53+
// publish to queue with user properties (important for message routing and metadata)
54+
55+
stm send --queue order-queue --message "Order 123 processed" --user-properties "orderId:123" "priority:high"
56+
5357
// deliver event with a default payload to queue
5458
5559
stm send --queue MyQueue
@@ -126,6 +130,10 @@ stm receive --queue my-queue
126130
127131
stm receive --queue my-queue -t "stm/logistics/shipped"
128132
133+
// receive with detailed output mode (useful for debugging and message inspection)
134+
135+
stm receive --topic "orders/*" --output-mode FULL
136+
129137
NOTE: You can override any of the receive parameters
130138
that are applied only for this instance of execution!
131139
@@ -197,6 +205,10 @@ stm request --topic solace/try/me/request -f OrderCreated.json
197205
198206
stm request --topic solace/try/me/request --stdin
199207
208+
// request with timeout and multiple requests (essential for request-reply patterns)
209+
210+
stm request --topic "api/status" --message "Check status" --timeout 10000 --count 3 --interval 2000
211+
200212
NOTE: You can override any of the request parameters
201213
that are applied only for this instance of execution!
202214
@@ -224,7 +236,7 @@ stm request --name request --config cloud-broker --save request2
224236
225237
// Duplicate the command setting with the specified command-line parameters
226238
227-
stm request --topic "stm/logistics/sipped" --name request2 --config cloud-broker --save request4
239+
stm request --topic "stm/logistics/shipped" --name request2 --config cloud-broker --save request4
228240
229241
HINT: You can verify the outcome by executing a config list command 'stm config list --config cloud-broker.json'!
230242
```
@@ -268,6 +280,10 @@ stm reply --topic solace/try/me/request -f OrderCreated.json
268280
269281
stm reply --topic solace/try/me/request --stdin
270282
283+
// reply with user properties (important for response metadata and correlation)
284+
285+
stm reply --topic "api/response" --message "Success" --user-properties "status:200" "responseTime:150ms"
286+
271287
NOTE: You can override any of the reply parameters
272288
that are applied only for this instance of execution!
273289
@@ -295,7 +311,7 @@ stm reply --name reply --config cloud-broker --save reply2
295311
296312
// Duplicate the command setting with the specified command-line parameters
297313
298-
stm reply --topic "stm/logistics/sipped" --name reply2 --config cloud-broker --save reply4
314+
stm reply --topic "stm/logistics/shipped" --name reply2 --config cloud-broker --save reply4
299315
300316
HINT: You can verify the outcome by executing a config list command 'stm config list --config cloud-broker.json'!
301317
```
@@ -361,7 +377,7 @@ stm manage queue --name queue --config cloud-broker --save queue2
361377
362378
// Duplicate the command setting with the specified command-line parameters
363379
364-
stm manage queue --add-subscriptions "stm/logistics/sipped" --name queue2 --config cloud-broker --save queue4
380+
stm manage queue --add-subscriptions "stm/logistics/shipped" --name queue2 --config cloud-broker --save queue4
365381
366382
HINT: You can verify the outcome by executing a config list command 'stm config list --config cloud-broker.json'!
367383
```

0 commit comments

Comments
 (0)