Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/BuslyCLI.Console/Commands/Demo/StartCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ public class StartDemoCommand(IAnsiConsole console, IRawEndpointFactory rawEndpo
{
public override async Task<int> ExecuteAsync(CommandContext context, CurrentTransportSettings settings, CancellationToken cancellationToken)
{
console.WriteLine("Starting demo endpoint for quick start guide...");
console.WriteLine($"Starting demo endpoint named {Constants.DemoDefaultOriginatingEndpoint} for quick start guide...");
var config = await nServiceBusConfiguration.GetValidatedConfigurationAsync(settings.Config.Path);
var rawEndpoint = await rawEndpointFactory.CreateRawEndpoint(Constants.DemoDefaultOriginatingEndpoint, config.CurrentTransportConfig);

await rawEndpoint.StartEndpoint();
console.WriteLine($"{Constants.DemoDefaultOriginatingEndpoint} Endpoint Started.");
await rawEndpoint.Subscribe("Messages.Events.OrderPlaced", cancellationToken);

do
Expand Down
2 changes: 1 addition & 1 deletion src/BuslyCLI.Console/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public static class Constants
{
public const string DefaultOriginatingEndpoint = "BuslyCLI";
public const string DemoDefaultOriginatingEndpoint = "BuslyDemo";
public const string DemoDefaultOriginatingEndpoint = $"{DefaultOriginatingEndpoint}.DemoEndpoint";
public const string DefaultConfigPath = "~/.busly-cli/config.yaml";

public static class NServiceBus
Expand Down
80 changes: 71 additions & 9 deletions website/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ busly demo start

## What Demo Mode Does

- Creates and starts an NServiceBus endpoint named `BuslyDemo` using your transport configuration.
- Creates and starts an NServiceBus endpoint named `BuslyCLI.DemoEndpoint` using your transport configuration.
- Allows Busly to receive any command sent to it.
- Automatically subscribes to a single event: `Messages.Events.OrderPlaced`

Expand All @@ -119,8 +119,8 @@ Demo mode is intended strictly for this quick-start guide. Using it outside of t
```bash
busly command send \
--content-type 'text/json' \
--enclosed-message-type "BusyCLI.GettingStarted.Endpoint.CreateOrder" \
--destination-endpoint BusCLI.GettingStarted.Endpoint \
--enclosed-message-type "Messages.Commands.CreateOrder" \
--destination-endpoint "BuslyCLI.DemoEndpoint" \
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'
```

Expand All @@ -130,11 +130,43 @@ busly command send \
```bash
busly command send `
--content-type 'text/json' `
--enclosed-message-type "BusyCLI.GettingStarted.Endpoint.CreateOrder" `
--destination-endpoint BusCLI.GettingStarted.Endpoint `
--enclosed-message-type "Messages.Commands.CreateOrder" `
--destination-endpoint "BuslyCLI.DemoEndpoint" `
--message-body ('{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'-replace '"', '\"')
```

</TabItem>
<TabItem value="docker bash" label="Docker (Bash)">

```bash
docker run --rm \
--network host \
-v "$HOME/.busly-cli/config.yaml:/app/config.yaml" \
tragiccode/busly-cli \
command send \
--content-type "text/json" \
--enclosed-message-type "Messages.Commands.CreateOrder" \
--destination-endpoint "BuslyCLI.DemoEndpoint" \
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}' \
--config ./config.yaml
```

</TabItem>
<TabItem value="docker powershell" label="Docker (Powershell)">

```bash
docker run --rm `
--network host `
-v "$HOME/.busly-cli/config.yaml:/app/config.yaml" `
tragiccode/busly-cli `
command send `
--content-type "text/json" `
--enclosed-message-type "Messages.Commands.CreateOrder" `
--destination-endpoint "BuslyCLI.DemoEndpoint" `
--message-body ('{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'-replace '"', '\"') `
--config ./config.yaml
```

</TabItem>
</Tabs>

Expand All @@ -144,9 +176,9 @@ busly command send `
<TabItem value="bash" label="Bash">

```bash
busly event publish `
--content-type 'text/json' `
--enclosed-message-type "BusyCLI.GettingStarted.Endpoint.OrderCreated" `
busly event publish \
--content-type 'text/json' \
--enclosed-message-type "Messages.Events.OrderPlaced" \
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'
```

Expand All @@ -156,9 +188,39 @@ busly event publish `
```bash
busly event publish `
--content-type 'text/json' `
--enclosed-message-type "BusyCLI.GettingStarted.Endpoint.OrderCreated" `
--enclosed-message-type "Messages.Events.OrderPlaced" `
--message-body ('{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'-replace '"', '\"')
```

</TabItem>
<TabItem value="docker bash" label="Docker (Bash)">

```bash
docker run --rm \
--network host \
-v "$HOME/.busly-cli/config.yaml:/app/config.yaml" \
tragiccode/busly-cli \
event publish \
--content-type "text/json" \
--enclosed-message-type "Messages.Events.OrderPlaced" \
--message-body '{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}' \
--config ./config.yaml
```

</TabItem>
<TabItem value="docker powershell" label="Docker (Powershell)">

```bash
docker run --rm `
--network host `
-v "$HOME/.busly-cli/config.yaml:/app/config.yaml" `
tragiccode/busly-cli `
event publish `
--content-type "text/json" `
--enclosed-message-type "Messages.Events.OrderPlaced" `
--message-body ('{"OrderNumber":"3f2d6c8a-b7a2-4c3f-9c3e-12ab45ef6789"}'-replace '"', '\"') `
--config ./config.yaml
```

</TabItem>
</Tabs>