jms

How to get number of pending message in a jms queue

左心房为你撑大大i 提交于 2020-08-26 07:27:50
问题 Is there any way to get count number of pending messages in jms queue. My aim is to close the connection if there is no message remaining in the queue to process. how can i achieve this. ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url); Connection connection = connectionFactory.createConnection("admin", "admin"); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = session.createQueue(subject);

How can I allow multiple @JmsListener destinations for a single method

扶醉桌前 提交于 2020-07-23 09:49:05
问题 I'm currently working on migrating an IBM Webshere application to Spring Boot. As part of this there is an MDB class which needs to be converted into @JmsListener . This MDB has a single method that is listening to multiple queues. I would like to do the same using @JmsListener with multiple destinations. I saw this thread, but that's not working. This is the current MDB Configuration : Bean 1 <bean id="myAppabcResponseMDB" class="company.myApp.service.mdb.MyAppMessageListenerMDB"/> <bean id=

How can I allow multiple @JmsListener destinations for a single method

孤街醉人 提交于 2020-07-23 09:48:08
问题 I'm currently working on migrating an IBM Webshere application to Spring Boot. As part of this there is an MDB class which needs to be converted into @JmsListener . This MDB has a single method that is listening to multiple queues. I would like to do the same using @JmsListener with multiple destinations. I saw this thread, but that's not working. This is the current MDB Configuration : Bean 1 <bean id="myAppabcResponseMDB" class="company.myApp.service.mdb.MyAppMessageListenerMDB"/> <bean id=