Start and Stop JMS Listener using Spring

后端 未结 3 1396
半阙折子戏
半阙折子戏 2020-12-16 23:35

So question is how to temporary stop and start a jms listener created using spring using the fallowing way :



        
3条回答
  •  再見小時候
    2020-12-16 23:59

    Yes thats do the trick.

    
            
    
    
    
    
    DefaultMessageListenerContainer exampleProductsMessageListener= Registry.getApplicationContext().getBean("exampleProductsMessageListener", DefaultMessageListenerContainer.class);
    exampleProductsMessageListener.stop();
    

提交回复
热议问题