ActiveMq – Explicitly configure Spring ActiveMq ConnectionFactory with SpringBoot
activemq
4
springboot
135
connectionfactory
1
Male avatar

loveprogramming viết ngày 29/04/2021

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

Bình luận


White
{{ comment.user.name }}
Bỏ hay Hay
{{comment.like_count}}
Male avatar
{{ comment_error }}
Hủy
   

Hiển thị thử

Chỉnh sửa

Male avatar

loveprogramming

444 bài viết.
77 người follow
Kipalog
{{userFollowed ? 'Following' : 'Follow'}}
Cùng một tác giả
Male avatar
1 0
Tutorial Link: (Link) (Ảnh) Django is a Pythonbased free and opensource web framework that follows the modeltemplateview architectural pattern. A...
loveprogramming viết 6 tháng trước
1 0
Male avatar
1 0
https://loizenai.com/angular11nodejspostgresqlcrudexample/ Angular 11 Node.js PostgreSQL Crud Example (Ảnh) Tutorial: “Angular 11 Node.js Postg...
loveprogramming viết 5 tháng trước
1 0
Male avatar
1 0
Angular Spring Boot jwt Authentication Example Github https://loizenai.com/angularspringbootjwt/ (Ảnh) Tutorial: ” Angular Spring Boot jwt Authe...
loveprogramming viết 5 tháng trước
1 0
Bài viết liên quan
Male avatar
0 0
https://grokonez.com/frontend/angular/angular6/kotlinspringbootangular6crudhttpclientmysqlexamplespringdatajparestapisexample Kotlin Spring Boot +...
loveprogramming viết 1 tháng trước
0 0
{{like_count}}

kipalog

{{ comment_count }}

bình luận

{{liked ? "Đã kipalog" : "Kipalog"}}


Male avatar
{{userFollowed ? 'Following' : 'Follow'}}
444 bài viết.
77 người follow

 Đầu mục bài viết

Vẫn còn nữa! x

Kipalog vẫn còn rất nhiều bài viết hay và chủ đề thú vị chờ bạn khám phá!