---
title: "Discussion on \"Replacing ThreadLocal with ScopedValue for Request IDs (Java 25)\" | Hashnode"
description: "Discussion on \"Replacing ThreadLocal with ScopedValue for Request IDs (Java 25)\". A real request-ID migration from ThreadLocal/MDC to Java 25 ScopedValue: the pool-thread leak, child tasks, StructuredTaskScope and the MDC bridge."
url: "https://hashnode.com/posts/replace-threadlocal-with-scopedvalue-java-25/6ae3683e2638c25790c50fcd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Replacing ThreadLocal with ScopedValue for Request IDs (Java 25)](https://gowthammuthuvel.hashnode.dev/replace-threadlocal-with-scopedvalue-java-25?utm_source=hashnode&utm_medium=feed)

A real request-ID migration from ThreadLocal/MDC to Java 25 ScopedValue: the pool-thread leak, child tasks, StructuredTaskScope and the MDC bridge.

Oct 29 · 18 min read · gowthammuthuvel.hashnode.dev  
Updated Nov 12  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#concurrency](https://hashnode.com/tag/concurrency)
-   [#virtual-threads](https://hashnode.com/tag/virtual-threads)
-   [#logging](https://hashnode.com/tag/logging)
-   [#backend](https://hashnode.com/tag/backend)

## Written by

[Gowtham Muthuvel](https://hashnode.com/@GowthamMuthuvel)

@GowthamMuthuvel

  
[View profile](https://hashnode.com/@GowthamMuthuvel)

Full-stack developer | Java, Spring Boot, React | Senior Backend Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
