Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving all docs to docs folder #99

Merged
merged 11 commits into from
Jan 31, 2025
Merged
39 changes: 0 additions & 39 deletions Package-README.md

This file was deleted.

75 changes: 65 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

This showcase consists of 4 processes hosting MassTransit message producers and consumers that implement a simplified order processing logic from an e-commerce system.

![System Overview](diagram.svg "width=680")

![System Overview](docs/diagram.svg "width=680")

## Launching the Showcase in Docker

Expand All @@ -13,11 +12,12 @@ To help getting started we have created a few docker compose files that orchestr
Run the docker command below from the `src` folder in a terminal.

```cmd
docker compose -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env up -d
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env up -d
```

### To run against **Azure Service Bus**
### (Alternative) Run in Docker against **Azure Service Bus**

<details>
The showcase can also be run using Azure Service Bus rather than RabbitMQ.
First configure the access to your Azure Service Bus namespace by editing the variables in `src/asb.env`.

Expand All @@ -28,25 +28,33 @@ CONNECTIONSTRING="Endpoint=sb://[NAMESPACE].servicebus.windows.net/;SharedAccess
Run docker command below from the `src` folder in a terminal.

```cmd
docker compose -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env up -d
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env up -d
```

## Running from an IDE
</details>

### (Alternative) Run from an IDE

<details>
> [!WARNING]
> When using Visual Studio, ensure you have the "Enable Multi-Project Launch profiles" setting on. Allow Visual Studio 2022 "multi-launch" so you can easily select the profile you want to run.
>
> It can be activated by accessing the Tools menu -> Manage preview features- Enable Multi-Project Launch profiles.

To start the required infrastructure run the following docker command below from the `src` folder in a terminal.
To start the required infrastructure for the showcase, run one of the docker command below from the `src` folder in a terminal.

RabbitMQ

```cmd
docker compose -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env --profile infrastructure --profile frontend up -d
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env --profile infrastructure --profile frontend up -d
```

Azure Service Bus

See [ASB setup](#alternative-run-from-azure-service-bus) above for setting the connection string to your Azure Service Bus namespace

```cmd
docker compose -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env --profile infrastructure --profile frontend up -d
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env --profile infrastructure --profile frontend up -d
```

After opening the solution (from Visual Studio or Rider), choose one of the run profiles that matches the transport configured previously:
Expand All @@ -56,6 +64,53 @@ After opening the solution (from Visual Studio or Rider), choose one of the run

Run the solution to start the demo.

</details>

## Opening the showcase UI

Navigate to http://localhost:61335/ to see the UI.
Navigate to http://localhost:61335/ to see the UI. Click `Run Scenario` to start the showcase scenario and generate some simulated message handling failures.

## Handling failures with the Particular Platform

### Inspecting failures

Navigate to [http://localhost:9090](http://localhost:9090) in a new tab, or click the `View in ServicePulse` button, to see the details on failures ingested by the platform.

![Service Pulse Dashboard](docs/service-pulse-dashboard-failed-messages.png "Message processing errors summary view")

### Scheduling message reprocessing

Click on the "Failed Messages" button at the top of the page to see all failed messages ingested by the platform, grouped by the exception type and stack trace.

![Service Pulse Failed Messages](docs/service-pulse-dashboard-failed-messages-groups.png "Failed messages grouping")

Drill into an existing group to see the list of individual processing failures. Clicking on any of the rows in the list shows detailed information of a given failed message in the headers and message body tabs.

A failed message can be scheduled for reprocessing by clicking the `Retry message` button.

> [!NOTE]
> It may take several seconds after retrying a message for it to appear again in the consumer's input queue

![Service Pulse Failed Message View](docs/service-pulse-failed-message-view.png "Failed message details view")

### Editing messages before reprocessing

Go to the details page for one of the failed messages and click the `Edit & retry` button. The pop-up window shows the headers collection and the message body in two separate tabs.

Navigate to the `Message Body` tab and change some of the contents of the message, ensuring it's still valid JSON matching the message type, and click "Retry" to schedule the message for reprocessing.

> [!WARNING]
> Changing or deleting header values may change or cause issues with the subsequent re-processing. It is recommended that these values are not changed if you are unsure of their purpose.

![Edit Message View](docs/service-pulse-edit-before-retry.png "Edit & Retry view showing the message body")

### Viewing retries

Return to the showcase UI to see that the retries have now been successfully handled.

### Troubleshooting

Having issues?

- Check logs in docker. Ensure that there are no port clashes with existing containers or services on your machine.
- Ask any questions on [our forum](https://discuss.particular.net/tag/masstransit)
File renamed without changes
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/service-pulse-dashboard-failed-messages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/service-pulse-edit-before-retry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/service-pulse-failed-message-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 0 additions & 116 deletions sample.md

This file was deleted.

Binary file removed service-pulse-dashboard-failed-messages-groups.png
Binary file not shown.
Binary file removed service-pulse-dashboard-failed-messages.png
Binary file not shown.
Binary file removed service-pulse-edit-before-retry.png
Binary file not shown.
Binary file removed service-pulse-failed-message-view.png
Binary file not shown.
11 changes: 11 additions & 0 deletions src/compose-rabbitmq-user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
masstransit-connector:
environment:
- RABBITMQ_MANAGEMENT_API_URL
- RABBITMQ_MANAGEMENT_API_USERNAME
- RABBITMQ_MANAGEMENT_API_PASSWORD
service-control:
environment:
- LICENSINGCOMPONENT_RABBITMQ_APIURL=${RABBITMQ_MANAGEMENT_API_URL}
- LICENSINGCOMPONENT_RABBITMQ_USERNAME=${RABBITMQ_MANAGEMENT_API_USERNAME}
- LICENSINGCOMPONENT_RABBITMQ_PASSWORD=${RABBITMQ_MANAGEMENT_API_PASSWORD}
6 changes: 5 additions & 1 deletion src/compose-rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- rabbitmq-logs:/var/log/rabbitmq
ports:
- 33721:5672
- 15672:15672
- 33672:15672
configs:
- source: plugins
target: /etc/rabbitmq/enabled_plugins
Expand All @@ -30,6 +30,10 @@ services:
depends_on:
rabbitmq:
condition: service_healthy
environment:
- LICENSINGCOMPONENT_RABBITMQ_APIURL=${RABBITMQ_MANAGEMENT_API_URL}
- LICENSINGCOMPONENT_RABBITMQ_USERNAME=${RABBITMQ_MANAGEMENT_API_USERNAME}
- LICENSINGCOMPONENT_RABBITMQ_PASSWORD=${RABBITMQ_MANAGEMENT_API_PASSWORD}

masstransit-connector:
environment:
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/public/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
3. Open a terminal and run these commands:

```cmd
docker compose -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env down
docker compose -f docker-compose-base.yml --env-file asb.env --profile infrastructure up
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-azure.yml --env-file asb.env down
docker compose -p particular-platform -f docker-compose-base.yml --env-file asb.env --profile infrastructure up
```
6 changes: 3 additions & 3 deletions src/frontend/public/rabbit.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Running with your own RabbitMQ system

1. Open the `src/rabbit.env` file in an editor and update the RabbitMQ configuration to point to your own RabbitMQ instance.
1. `CONNECTION_STRING` A special connection string to connect to RabbtiMQ, see https://docs.particular.net/servicecontrol/transports#rabbitmq for syntax format.
1. `CONNECTION_STRING` A special connection string to connect to RabbitMQ, see https://docs.particular.net/servicecontrol/transports#rabbitmq for syntax format.
2. `RABBITMQ_MANAGEMENT_API_URL` The management API URL.
3. `RABBITMQ_MANAGEMENT_API_USERNAME` The management API username.
4. `RABBITMQ_MANAGEMENT_API_PASSWORD` The management API password.
2. Update the list of queues you want to monitor by editing the `src/queues.txt` file. RabbitMQ is case-sensitive so make sure the names are exact. e.g. `myqueue_error`.
3. Open a terminal and run these commands:

```cmd
docker compose -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env down
docker compose -f docker-compose-base.yml --env-file rabbit.env --profile infrastructure up
docker compose -p particular-platform-showcase -f docker-compose-base.yml -f compose-rabbitmq.yml --env-file rabbit.env down
docker compose -p particular-platform -f docker-compose-base.yml -f compose-rabbitmq-user.yml --env-file rabbit.env --profile infrastructure up
```
1 change: 1 addition & 0 deletions src/frontend/src/components/guideline/TryItOut.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ onMounted(async () => {
margin: 0.5em;
padding-left: 1em;
background-color: lightgray;
overflow: auto;
}
</style>
5 changes: 5 additions & 0 deletions src/rabbit.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ CONNECTION_STRING="host=rabbitmq"
RABBITMQ_MANAGEMENT_API_URL="http://rabbitmq:15672"
RABBITMQ_MANAGEMENT_API_USERNAME=guest
RABBITMQ_MANAGEMENT_API_PASSWORD=guest

#Only used for the showcase processes
RABBITMQ_HOST="rabbitmq"
RABBITMQ_PORT="5672"
RABBITMQ_VIRTUALHOST="/"
9 changes: 0 additions & 9 deletions troubleshooting-guide.md

This file was deleted.