11 Mayıs 2020 Pazartesi

SpringJMS DefaultJmsListenerContainer Sınıfı

Giriş
DefaultJmsListenerContainerFactory tarafından yaratılır. Mesajları asenkron olarak okur ve işler.

setConcurrency metodu
Açıklaması şöyle.
Notice the concurrency="10-50" property above. This is a simplified configuration for setting the concurrentConsumers=10 and the maxConcurrentConsumers=50 properties of the DMLC. This tells the DMLC to always start up a minimum of 10 consumers.
setConcurrentConsumers metodu
Açıklaması şöyle. Default olarak 1 tane consumer ile başlar. Bu metod yerine setConcurrency() metodu kullanılabilir.
The Spring DefaultMessageListenerContainer (DMLC) is a highly flexible container for consuming JMS messages that can handle many different use cases via the numerous properties that it provides. For the situation mentioned above, the DMLC offers the ability to dynamically scale the number of consumers. That is, as the number of messages available for consumption increases, the DMLC can automatically increase and decrease the number of consumers. To configure the DMLC to automatically scale the number message consumers, the concurrentConsumers property and the maxConcurrentConsumers property are used.
setTaskExecutor metodu
Açıklaması şöyle.
So, the main use-case for setting the task executor is for integration with an existing thread pool. The default executor will already scale according to the number of concurrent consumers you configure. 

Hiç yorum yok:

Yorum Gönder