SolaceProducts / solace-spring-cloud

An umbrella project containing all Solace projects for Spring Cloud
Apache License 2.0
20 stars 14 forks source link

Define consumer thread names #268

Closed AndreKoepke closed 2 months ago

AndreKoepke commented 6 months ago

What I want?

Clear thread-names would be great.

Why I want it?

We have a lot consumers and got issues because of (unexpected) long-running consumer. I want to check the threads and have the problem thatI cant match the thread to our different consumers.
image

Where can Solace fix it?

https://github.com/SolaceProducts/solace-spring-cloud/blob/5af78f644ca073ab13ec8c21d5793e344b6719d0/solace-spring-cloud-stream-binder/solace-spring-cloud-stream-binder-core/src/main/java/com/solace/spring/cloud/stream/binder/inbound/JCSMPInboundChannelAdapter.java#L157

How can it be fixed?

  1. Easy -> Create a ThreadFactory with a prefix of the binding. I will create a small PR for it.
  2. Take a ThreadPoolExcutor from application-context. In other words: Allow to give a bean-name in parameters and use that bean.