Skip to content

Add ability to name listener threads #458

@onobc

Description

@onobc

NOTE: Below description directly cloned from spring-projects/spring-kafka#2501

Summary

Currently listener thread names are set by the task executor; by default, a SimpleAsyncTaskExecutor is used, with thread names

<beanName>-C-<m>-<n> where <beanName> is usually the listener Id, <n> is an incrementing integer, and <m> is the index of the child container.

Add an option to supply a thread name, based on the container, with the default returning the container's listenerId. For child containers, this is the parent listener id + -<m>.

Motivation

Project Loom virtual threads have no name by default; making it difficult to correlate container activity in logs, when there are multiple containers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: virtual-threadsIssues related to supporting Java 21's virtual threads

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions