Giriş
Ayarlar spring.task.execution ve spring.task.scheduling başlıkları altında
Örnek
Şöyle yaparız
Örnek
Şöyle yaparız
# Core number of threads. Default is 8
spring.task.execution.pool.core-size=10
# Maximum allowed number of threads. Default is 1
spring.task.scheduling.pool.size=5
Şöyle yaparız
spring.task.execution.pool.max-size=16spring.task.execution.pool.queue-capacity=100spring.task.execution.pool.keep-alive=10s
This changes the thread pool to use a bounded queue so that when the queue is full (100 tasks), the thread pool increases to maximum 16 threads. Shrinking of the pool is more aggressive as threads are reclaimed when they are idle for 10 seconds (rather than 60 seconds by default).
Örnek
Şöyle yaparız
#Number of core threadsspring.task.execution.pool.core-size=10#Maximum number of threadsspring.task.execution.pool.max-size=20#Thread name prefixspring.task.execution.thread-name-prefix=test#There are other configurations that readers can configure themselves
Hiç yorum yok:
Yorum Gönder