Each ConsumeMessageThread should have different thread name
See original GitHub issueFEATURE REQUEST
-
Please describe the feature you are requesting. I am looking for a feature of
ConsumeMessageThread
for differentConsumer
has different ThreadName. -
Provide any additional detail on your proposed use case for this feature. For example, when two PushConsumer started in the same process, the client will create two ThreadPool for message consumption. But Threads in the two pools share the same thread names, thus cause confusion and increase the complexity of resolving problems.
-
Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue? Nice to have. Not any workarounds.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Can Java understand that threads which have same name are ...
1 Answer 1 ... From the Javadoc: Every thread has a name for identification purposes. More than one thread may have the same...
Read more >Naming a thread and fetching name of current thread in Java
It is a direct method of naming threads in java, each thread has a name that is: Thread-0, Thread-1, Thread-2,….so on.
Read more >Set the Name of a Thread in Java - Baeldung
In this tutorial, we'll look at different ways to set the name of a Thread in Java. First, we'll create an example of...
Read more >Set a Thread Name in Native Code - Visual Studio (Windows)
There are two ways to set a thread name. The first is via the SetThreadDescription function. The second is by throwing a particular...
Read more >How to Check Thread Names in the ThreadPoolExecutor in ...
We would expect each worker thread to have a separate native and Python ID from the main thread and from each other.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@duhenglucky Thanks for your reply. In some scenarios, it’s necessary to create multi consumers. For example, suppose we have messages in two topics. One contains fewer messages, but each one takes a long consumption time, and the other is the opposite. In such a situation, subscribing these topics in one consumer maybe not a good choice. Because the few but heavy messages may block all ConsumeThreads, which leads to the another topic consumption latency. Here we need two isolated thread pools (consumer) for these two topics. For your second question, I think
ConsumerGroup
as a part ofConsumeThread
name is more intuitive thaninstance
.What about if modifying the code in
ConsumeMessageConcurrentlyService.java
fromto