Skip to content

Add Option to Set Listener Thread Name #2501

@garyrussell

Description

@garyrussell

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions