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:
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:
ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot
#activemq #springboot #connectionfactory