Provider configuration set number of messages to prefectch

一世执手 提交于 2019-12-11 07:47:46

问题


I am new to spring boot jms and i saw something like provider configuration - > set Number of messages to prefetch function, i could not find much about it and i don't have much clear idea as to what does it mean?

I have my concurrency set to 5-100. So does it mean, everytime a new consumer is spawned, this will get the number of messages, lets say if i set it 5, will it get 5 messages from queue at once?

Without using spring jms we use to make a receive call which can fetch upto 10 message, over here we have a jms listener, are these two same?

Can anyone clarify its real purpose in terms of multiple consumers, what it will do?


回答1:


Yes; the prefetch applies to each consumer.

Using multiple consumers allows you to process messages is parallel to improve performance, but you can only do that if the order in which you process messages is not important.



来源:https://stackoverflow.com/questions/53716717/provider-configuration-set-number-of-messages-to-prefectch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!