How do I set the prefetch limit for NMS listener container

[亡魂溺海] 提交于 2019-12-11 12:59:54

问题


Other than on the connection URL, how do I set the prefetch limit in spring config. I can't find any doc on any of the properties and the param on the Connection URL doesn't seem to work. Besides, I need to do this on the consumer level. Here is my config below.

   <nms:listener-container 
    connection-factory="SingleConnectionFactory" 
    concurrency="${GraphManagerService.NMS.Consumers}"
    auto-startup="false">
    <nms:listener ref="MessageListenerAdapter" destination="${GraphManagerService.NMS.QueueName}" />
   </nms:listener-container>

回答1:


To do this on a per-consumer basis you add the option to the destination.

myQueue?consumer.prefetchSize=10



来源:https://stackoverflow.com/questions/7956159/how-do-i-set-the-prefetch-limit-for-nms-listener-container

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