Skip to content

MassTransit/Sample-ForkJoint

Repository files navigation

Fork Joint

Fork Joint is a fictional restaurant built during Season 3 of the MassTransit Live Code Video Series. You can watch the episodes on YouTube and follow along by resetting to the various commits in the Git history.

Docker Setup

The sample application can be run using Docker, however, there are a couple setup tasks required.

  • Install Loki docker plugin docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
  • Start all the services docker compose -f .\docker-compose.services.yml up -d
  • Stopping all the services docker compose -f .\docker-compose.services.yml down -v

Certificate Setup

The docker-compose.api.yml maps the local ASP.NET certificate folder into the container so that HTTPS can be used. This is different depending upon your operating system.

I use a Mac with JetBrains Rider, so my configuration is in the GitHub repository.

To create the development certificate:

MAC:

dotnet dev-certs https -ep ~/.aspnet/https/aspnetapp.pfx -p Passw0rd
dotnet dev-certs https --trust

PC:

dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p Pass0wrd
dotnet dev-certs https --trust

You may need to modify the docker-compose.api.yml file to match your path for Windows.

See this page for more information, it was used to get this working on my machine.

Design Diagrams

Request Response

Request Response

Routing Slip

Routing Slip

Example SubmitOrder Post

POST https://localhost:5001/Order
Content-Type: application/json

{
  "orderId": "{{$guid}}",
  "burgers": [
    {
      "burgerId": "{{$guid}}",
      "weight": 2,
      "lettuce": false,
      "cheese": true,
      "pickle": true,
      "onion": true,
      "ketchup": true,
      "mustard": true,
      "barbecueSauce": true,
      "onionRing": true
    }
  ],
  "fries": [
    {
      "fryId": "{{$guid}}",
      "size": 1
    }
  ],
  "shakes": [
    {
      "shakeId": "{{$guid}}",
      "flavor": "Strawberry",
      "size": 1
    }
  ],
  "fryShakes": [
    {
      "fryShakeId": "{{$guid}}",
      "flavor": "Banna",
      "size": 1
    }
  ]
}

Logging and OpenTelemetry Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages