spring - How to reduce IBM "MQ get without data" call using DefaultJmsListenerContainerFactory - Stack Overflo

In our setup, we are observing a significant number of 'MQ get without data' messages alongsi

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745294042a4621033.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信