admin管理员组文章数量:1418696
In our setup, we are observing a significant number of 'MQ get without data' messages alongside 'MQ get with data' messages. With the following configuration, we see 85 calls per second for 'MQ get with Data' and 71 calls per second for 'MQ get without data' over a one-hour period.
We aim to further reduce the occurrence of 'MQ get without data' messages because empty gets can contribute to CPU overhead and we are also charged based on the number of 'get' calls. The provided statistics represent the best performance we could achieve with the current settings.
Furthermore, we have four @JmsListener components, each listening to a different queue, but all utilizing the same JmsListenerContainerFactory. Message processing time is around 8ms
@Bean
public JmsListenerContainerFactory jmsListenerContainerFactory(
ConnectionFactory defaultJmsConnectionFactory,
DestinationResolver jndiDestinationResolver,
ThreadPoolTaskExecutor jmsThreadPoolTaskExecutor) {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(defaultJmsConnectionFactory);
factory.setReceiveTimeout(120000L);
factory.setDestinationResolver(jndiDestinationResolver);
factory.setSubscriptionDurable(false);
factory.setTaskExecutor(jmsThreadPoolTaskExecutor);
factory.setBackOff(new FixedBackOff(40*1000, 3));
factory.setConcurrency("1-1");
return factory;
}
@Bean
public ThreadPoolTaskExecutor jmsThreadPoolTaskExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(4);
taskExecutor.setMaxPoolSize(6);
taskExecutor.setQueueCapacity(100);
taskExecutor.setKeepAliveSeconds(30);
taskExecutor.initialize();
taskExecutor.setThreadNamePrefix("jms-");
return taskExecutor;
}
I tried with increasing core pool size of ThreadPoolTaskExecutor and also multiple consumer but all leads to more MQ get without data calls.
Is there any other setting that can reduce MQ get without data calls?
本文标签:
版权声明:本文标题:spring - How to reduce IBM "MQ get without data" call using DefaultJmsListenerContainerFactory - Stack Overflo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745294042a2651969.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论