Skip to content

taonic/my-samples-java

Repository files navigation

My Temporal Java SDK Samples

A collection of samples demonstrating various features and patterns using the Temporal Java SDK.

Samples

Demonstrates how to execute activities on separate task queues by configuring different workers for different activity types.

Shows how to implement context-aware payload encryption where encryption keys are determined dynamically based on activity type.

Illustrates how to propagate context (like MDC) through workflow execution across multiple activities.

Demonstrates patterns for organizing and executing related activities in groups, both sequentially and in parallel.

Shows how to use interface inheritance with Temporal workflows to share common workflow methods.

Demonstrates manual activity retry using workflow signals instead of automatic retry policies.

Demonstrates using Protocol Buffers (protobuf) with Temporal for efficient data serialization.

Shows how to handle and retry workflows that encounter non-deterministic errors during execution.

Demonstrates using workflow queue to sequence workflow updates, useful for handling signals in order.

Implements a pattern for monitoring workflow signals with timeout detection and metrics tracking.

Shows how to implement custom timeout handling for long-running activities within workflows.

Provides examples of worker tuning techniques for different resource contention scenarios, with Prometheus metrics integration.

Building and Running

Each sample can be run using Gradle:

./gradlew -q execute -PmainClass=io.temporal.samples.<package>.Starter

Replace <package> with the sample package name you want to run.

Prerequisites

  • Java 8 or later
  • Temporal server running locally or a Temporal Cloud account
  • Gradle

For samples using metrics (like Worker Tuning):

  • Prometheus
  • Grafana

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published