问题
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