spring-jms

Could not start 2 embedded active-mq on different ports within different spring boot applications

廉价感情. 提交于 2019-11-27 15:54:44
I have 2 spring-boot applications. Each application has embedded active mq broker. I need to have 2 applications working on the same PC in parallel but it doesn't work now. First application always starts successfully: 2018-02-02 11:48:20.095 INFO 7660 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@53045c6c: startup date [Fri Feb 02 11:48:20 MSK 2018]; root of context hierarchy 2018-02-02 11:48:20.923 INFO 7660 --- [ JMX connector] o.a.a.broker.jmx.ManagementContext : JMX consoles can connect to

spring boot configure multiple ActiveMQ instances

流过昼夜 提交于 2019-11-27 15:01:46
问题 I have requirement to move messages from queues on one ActiveMQ instance to another ActiveMQ instance. Is there a way to connect to two different ActiveMQ instances using spring boot configuration? Do I need to create multiple connectionFactories? If so then how does JmsTemplate know which ActiveMQ instance to connect to? @Bean public ConnectionFactory connectionFactory() { return new ActiveMQConnectionFactory(JMS_BROKER_URL); } Any help and code examples would be useful. Thanks in advance.

Why DefaultMessageListenerContainer should not use CachingConnectionFactory?

懵懂的女人 提交于 2019-11-27 02:06:20
I was reading spring documentation on DefaultMessageListenerContainer It says "Note: Don't use Spring's CachingConnectionFactory in combination with dynamic scaling. Ideally, don't use it with a message listener container at all, since it is generally preferable to let the listener container itself handle appropriate caching within its lifecycle. Also, stopping and restarting a listener container will only work with an independent, locally cached Connection - not with an externally cached one." Could anybody explain why? You really don't need to cache sessions for listener containers because

Receiving multiple messages from MQ asynchronously

我怕爱的太早我们不能终老 提交于 2019-11-26 18:40:15
问题 I use Spring + Hibernate + JPA in my application. I need to read the message from Websphere MQ and insert the message to DB. Sometimes there may be continuous messages available and sometimes very less number of messages and sometimes we can expect no message from Queue . Currently I'm reading the message one by one and inserting them to Database. But it does not help much in terms of performance. I mean when I have chunk of messages(Example 300k messages in Queue) I could not insert them

Spring JMS and Websphere MQ

拈花ヽ惹草 提交于 2019-11-26 16:33:07
问题 hi I am new to Spring JMS and websphere MQ. Can Any one give me step by step processs or example how to receive message from websphere MQ and be able to print that message in console thanks u very much for your help 回答1: Here is a working sample using Spring MDP/Activation Spec for websphere MQ mdp-listener.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <bean id="messageListener" class="com