ActiveMQ Session Task thread name

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ Session Task thread name

nervousbadger
Hi there,

We are using ActiveMQ v5.3.1. We have multiple sessions per connection, each processing incoming messages. The problem we have is that each session dispatch thread has the same name - "ActiveMQ Session Task". We would like each thread to have a unique name to aid debugging using our application log files.
Looking at the code for ActiveMQConnection, I can see:
public TaskRunnerFactory getSessionTaskRunner() {
    synchronized (this) {
        if (sessionTaskRunner == null) {
            sessionTaskRunner = new TaskRunnerFactory("ActiveMQ Session Task", ThreadPriorities.INBOUND_CLIENT_SESSION, false, 1000, isUseDedicatedTaskRunner());
        }
    }
    return sessionTaskRunner;
}
So it looks like I can't configure this. Is there a way to do this, or will I need to patch the code?

Thanks,
Pete.