Skip to content

Commit 0c51b0a

Browse files
authored
Merge pull request #319 from TraGicCode/chore/add-some-examples-in-cli-reference-docs
Added examples for when running via bash
2 parents 4e31a75 + 304dbaa commit 0c51b0a

4 files changed

Lines changed: 61 additions & 8 deletions

File tree

website/docs/cli-reference/command/send.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@ busly send command
1212

1313
| Option | Description |
1414
| ------------------------------- | ----------------------------------------------------------------------------------------------- |
15-
| `-c`, `--content-type` | The fully qualified .NET type name of the enclosed message (ex: Ordering.Commands.CreateOrder ) |
16-
| `-e`, `--enclosed-message-type` | The type of serialization used for the message |
15+
| `-c`, `--content-type` | The type of serialization used for the message |
16+
| `-e`, `--enclosed-message-type` | The fully qualified .NET type name of the enclosed message (ex: Ordering.Commands.CreateOrder ) |
1717
| `-m`, `--message-body` | The content of the message body. Accepts a raw JSON string or a path to a file using curl-style `@` syntax (e.g. `@payload.json`). |
18+
| `-d`, `--destination-endpoint` | The destination endpoint to send the command to |
1819

1920
## Examples
2021

22+
```bash
23+
# Send a command with inline JSON
24+
busly command send \
25+
--content-type "text/json" \
26+
--enclosed-message-type "Messages.Commands.CreateOrder" \
27+
--destination-endpoint "Ordering" \
28+
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'
2129
```
2230

31+
```bash
32+
# Send a command using a JSON file
33+
busly command send \
34+
--content-type "text/json" \
35+
--enclosed-message-type "Messages.Commands.CreateOrder" \
36+
--destination-endpoint "Ordering" \
37+
--message-body @payload.json
2338
```

website/docs/cli-reference/demo/start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ busly demo start
1212

1313
## Examples
1414

15-
```
16-
15+
```bash
16+
busly demo start
1717
```

website/docs/cli-reference/event/publish.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,26 @@ busly event publish
1010

1111
## Options
1212

13-
| Option | Description |
14-
| ------------------------------- | ----------------------------------------------------------------------------------------------- |
15-
| `-c`, `--content-type` | The fully qualified .NET type name of the enclosed message (ex: Ordering.Commands.CreateOrder ) |
16-
| `-e`, `--enclosed-message-type` | The type of serialization used for the message |
13+
| Option | Description |
14+
| ------------------------------- | --------------------------------------------------------------------------------------------- |
15+
| `-c`, `--content-type` | The type of serialization used for the message |
16+
| `-e`, `--enclosed-message-type` | The fully qualified .NET type name of the enclosed message (ex: Ordering.Events.OrderPlaced ) |
1717
| `-m`, `--message-body` | The content of the message body. Accepts a raw JSON string or a path to a file using curl-style `@` syntax (e.g. `@payload.json`). |
1818

1919
## Examples
2020

21+
```bash
22+
# Publish an event with inline JSON
23+
busly event publish \
24+
--content-type "text/json" \
25+
--enclosed-message-type "Messages.Events.OrderPlaced" \
26+
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'
2127
```
2228

29+
```bash
30+
# Publish an event using a JSON file
31+
busly event publish \
32+
--content-type "text/json" \
33+
--enclosed-message-type "Messages.Events.OrderPlaced" \
34+
--message-body @payload.json
2335
```

website/docs/cli-reference/timeout/send.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,32 @@ Not all transports support sending timeouts. Transports that delegate delayed de
3535

3636
## Examples
3737

38+
```bash
39+
# Send a timeout with a delay
40+
busly timeout send \
41+
--content-type "text/json" \
42+
--enclosed-message-type "Messages.Timeouts.OrderTimeout" \
43+
--destination-endpoint "Ordering" \
44+
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}' \
45+
--delay-delivery-with "00:00:30"
3846
```
3947

48+
```bash
49+
# Send a timeout that doesn't deliver before a specific date/time
50+
busly timeout send \
51+
--content-type "text/json" \
52+
--enclosed-message-type "Messages.Timeouts.OrderTimeout" \
53+
--destination-endpoint "Ordering" \
54+
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}' \
55+
--do-not-deliver-before "2026-12-01T09:00:00Z"
56+
```
57+
58+
```bash
59+
# Send a timeout using a JSON file
60+
busly timeout send \
61+
--content-type "text/json" \
62+
--enclosed-message-type "Messages.Timeouts.OrderTimeout" \
63+
--destination-endpoint "Ordering" \
64+
--message-body @payload.json \
65+
--delay-delivery-with "00:00:30"
4066
```

0 commit comments

Comments
 (0)