Spring Applications
Project: Shipping Client
The objective of this exercise is to use message queues to process and ship orders asynchronously.
- Add the starters
spring-boot-starter-activemq and spring-boot-starter-json as dependencies to the bookstore application.
- Add the configuration class JmsConfig to the application to configure the Jackson message converter.
- Use the shipping DTO classes to implement a component
ShippingClient that
- sends a
ShippingOrder message to the OrderQueue after an order has been accepted
- sends a
ShippingCancel message to the CancelQueue if an order has to be canceled
- receives
ShippingInfo messages from the InfoQueue and updates the status of the corresponding order accordingly
- Inject the shipping client into the
OrderService and use it to initiate the shipping of placed orders.
- Add the library
org.apache.activemq:activemq-broker as test dependency and run the OrderServiceIT integration test.