https://grokonez.com/java-integration/spring-jms-explicitly-configure-spring-activemq-connectionfactory-springboot

ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot

In the past tutorial, we had learned how to start a Spring JMS ActiveMQ application with auto-configured ConnectionFactory by SpringBoot.
But in the software development, there’re many cases that we need to override the ContainerFactory, so How to do it? JavaSampleApproach makes the tutorial to guide how to explicitly configure Spring ActiveMQ ConnectionFactory.

Related posts:

I. Technologies

– Java 8 – Maven 3.6.1 – Spring Tool Suite: Version 3.8.4.RELEASE – Spring Boot: 1.5.4.RELEASE - Apache ActiveMQ 5.13.0

II. Spring ActiveMq connection-factory

For configuring ActiveMQ ContainerFactory, we need to setup a new bean ConnectionFactory to override the auto-configured connection-factory bean of SpringBoot.

...
@Bean
public ConnectionFactory connectionFactory(){
    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
	...
    return connectionFactory;
}

Then use the ConnectionFactory bean to configure 2 beans {JmsListenerContainerFactory, JmsTemplate}:

More at:

https://grokonez.com/java-integration/spring-jms-explicitly-configure-spring-activemq-connectionfactory-springboot

ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot

#activemq #springboot #connectionfactory

ActiveMq - Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot
1.40 GEEK