Bạn có chắc chắn muốn xóa bài viết này không ?
Bạn có chắc chắn muốn xóa bình luận này không ?
Angular 6 + SpringBoot RestAPIs + ActiveMQ Producer/Consumer example
Angular 6 + SpringBoot RestAPIs + ActiveMQ Producer/Consumer example
In the tutorial, we show how to Producer/Consumer data from ActiveMQ with Angular 6 & SpringBoot RestAPIs.
Related posts:
– ActiveMQ Producer/Consumer + SpringBoot RestAPIs example
– RabbitMq – How to create Spring RabbitMq Publish/Subcribe pattern with SpringBoot
– How to use Spring Kafka JsonSerializer (JsonDeserializer) to produce/consume Java Object messages
Related Pages:
Technologies
- Java 1.8
- Maven 3.3.9
- Spring Tool Suite – Version 3.9.4.RELEASE
- Spring Boot: 2.0.3.RELEASE
- ActiveMQ
- Angular 6
Overview
We create a Spring JMS ActiveMQ with JMS Producer & JMS Consumer as below:
Then expose RestAPIs to POST/GET data to/from ActiveMQ:
@PostMapping(value="/api/task")
@GetMapping(value="/api/tasks")
Use Angular Client to submit/get data from ActiveMQ via above RestAPI:
ActiveMQ state:
Practice
SpringBoot Backend
Setup SpringBoot project
Use SpringToolSuite to create a SpringBoot project with below dependencies:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
ActiveMQ Connection Factory
ActiveMqConnectionFactoryConfig
->
More at:
Angular 6 + SpringBoot RestAPIs + ActiveMQ Producer/Consumer example






