spring-jms

Make DefaultMessageListenerContainer with subscriptionShared and subscriptionDurable

核能气质少年 提交于 2020-05-15 20:57:50
问题 I want to use subscriptionShared and subscriptionDurable in DefaultMessageListenerContainer due to having a shared durable subscription between all consumers. After Tomcat start I see this log message many times and it seems my topic has a problem: Setup of JMS message listener invoker failed for destination x.y.z trying to recover. cause:org.apache.activemq.ActiveMQSession.createSharedDurableConsumer (Ljavax/jms/Topic;Ljava/lang/String;)Ljavax/jms/MessageConsumer" My Spring version is 4.3.8

Tracing memory leak in Spring Azure qPID JMS code

烂漫一生 提交于 2020-04-30 05:10:28
问题 Im trying to trace and identify root cause for memory leak in our very small and simple Spring Boot application. It uses following: - Spring Boot 2.2.4 - azure-servicebus-jms-spring-boot-starter 2.2.1 - MSSQL Function: The app only dispatches Azure ServiceBus queue and stores data and sends data to other destination. It is a small app so it starts easily with 64 megs of memory, despite I give it up to 256 megs via Xmx option. Important note is the queue is being dispatched using Spring

Tracing memory leak in Spring Azure qPID JMS code

老子叫甜甜 提交于 2020-04-30 05:10:19
问题 Im trying to trace and identify root cause for memory leak in our very small and simple Spring Boot application. It uses following: - Spring Boot 2.2.4 - azure-servicebus-jms-spring-boot-starter 2.2.1 - MSSQL Function: The app only dispatches Azure ServiceBus queue and stores data and sends data to other destination. It is a small app so it starts easily with 64 megs of memory, despite I give it up to 256 megs via Xmx option. Important note is the queue is being dispatched using Spring

DefaultJmsListenerContainer using BeanFactoryPostProcessor

不羁的心 提交于 2020-03-04 23:04:28
问题 I am currently trying to support dynamic multiple jms provider scenario in my application. So far I did achieved to create DefaultMessageListenerContainer using post processor. Cool part is that the DefaultMessageContainerListener has destinationName property where you can easily set the queue to be listened/sent for messages. However, the DefaultJmsListenerContainerFactory has no such method to set the queue name. I do reached at around the SimpleJmsListenerEndpoint that the

Spring JMS Session Issue When Using Open MQ

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-25 05:43:32
问题 I'm using spring-jms-3.0.6.RELEASE and open MQ. Any ideas on why the below exception would be raise? 2012-05-02 17:56:18,420 [stuJmsContainer-803059] WARN org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'TestQ' - trying to recover. Cause: MQRA:CA:createSession failed-Only one JMS Session allowed when managed connection is involved in a transaction web.xml: <context-param> <param-name>contextConfigLocation</param

Spring JMS Session Issue When Using Open MQ

天大地大妈咪最大 提交于 2020-02-25 05:41:06
问题 I'm using spring-jms-3.0.6.RELEASE and open MQ. Any ideas on why the below exception would be raise? 2012-05-02 17:56:18,420 [stuJmsContainer-803059] WARN org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'TestQ' - trying to recover. Cause: MQRA:CA:createSession failed-Only one JMS Session allowed when managed connection is involved in a transaction web.xml: <context-param> <param-name>contextConfigLocation</param

Adding Dynamic Number of Listeners(Spring JMS)

我只是一个虾纸丫 提交于 2020-01-29 05:21:07
问题 I have a requirement to add multiple listeners as mentioned in the application.properties file. Like Below, InTopics=Sample.QUT4,Sample.T05,Sample.T01,Sample.JT7 NOTE: This number can be lot more or less. I am thinking of getting them in an array, @Value("${InTopics}") private String[] inTopics; But i don't know how to create multiple listeners from the array. Currently, for one Topic i am doing as below, @Configuration @EnableJms public class JmsConfiguration { @Value("${BrokerURL}") private

Adding Dynamic Number of Listeners(Spring JMS)

一曲冷凌霜 提交于 2020-01-29 05:21:05
问题 I have a requirement to add multiple listeners as mentioned in the application.properties file. Like Below, InTopics=Sample.QUT4,Sample.T05,Sample.T01,Sample.JT7 NOTE: This number can be lot more or less. I am thinking of getting them in an array, @Value("${InTopics}") private String[] inTopics; But i don't know how to create multiple listeners from the array. Currently, for one Topic i am doing as below, @Configuration @EnableJms public class JmsConfiguration { @Value("${BrokerURL}") private

junit spring jms listener

落爺英雄遲暮 提交于 2020-01-23 12:49:20
问题 I want to unit test a simple jms listener code below @Component public class NotificationReader { @JmsListener(destination = "myAppQ") public void receiveMessage(NotificationMessage notificationMessage) { System.out.println("Received <" + notificationMessage.getStaffNumber() + ">"); } } From the junit, I am using jmsTemplate to pump the message into Active MQ. I want to test if the jms listener got invoked. I saw few solutions ( using counters ) like How to wait for @JMSListener annotated

Control consumption of multiple JMS queues

别说谁变了你拦得住时间么 提交于 2020-01-21 19:18:12
问题 I can't find this information anywhere. I have two queues, @JmsListener(destination = "p1") , @JmsListener(destination = "p2") . How can I make sure I only process 1 message at a time, even though I am listening to 2 queues, and also how do I configure the polling of what queue I get messages from first, that is after processing a message I want to poll p1 first. Or do weighted polling: p1 :90%, p2 :10%. Etc. Basically I am asking how to implement priority processing of messages for Spring .