Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.84 KB

File metadata and controls

58 lines (41 loc) · 1.84 KB

Hello Cities — Durable Functions Java Quickstart

Java | Durable Functions

Description

This quickstart demonstrates Durable Functions with Java using the Durable Task Scheduler backend. It includes two patterns:

  1. Function Chaining — An orchestration that calls three "say hello" activities sequentially for different cities
  2. Fan-out/Fan-in — An orchestration that greets multiple cities in parallel and aggregates the results

Prerequisites

  1. Java 11+ (JDK)
  2. Maven
  3. Azure Functions Core Tools v4
  4. Docker (for the emulator)

Quick Run

  1. Start the emulator:

    docker run -d -p 8080:8080 -p 8082:8082 mcr.microsoft.com/dts/dts-emulator:latest
  2. Build and run:

    cd samples/durable-functions/java/HelloCities
    mvn clean package
    func start
  3. Trigger the function chaining orchestration:

    curl -X POST http://localhost:7071/api/StartChaining
  4. Trigger the fan-out/fan-in orchestration:

    curl -X POST http://localhost:7071/api/StartFanOutFanIn
  5. View in the dashboard: http://localhost:8082

Expected Output

The chaining orchestration greets Tokyo, Seattle, and London sequentially:

Hello Tokyo! Hello Seattle! Hello London!

The fan-out/fan-in orchestration greets all three cities in parallel and returns aggregated results.

Learn More